Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb_re2::DFA::Workq Class Reference
Inheritance diagram for duckdb_re2::DFA::Workq:
Collaboration diagram for duckdb_re2::DFA::Workq:

Public Member Functions

 Workq (int n, int maxmark)
bool is_mark (int i)
int maxmark ()
void clear ()
void mark ()
int size ()
void insert (int id)
void insert_new (int id)
Public Member Functions inherited from duckdb_re2::SparseSetT< void >
 SparseSetT (int max_size)
int size () const
int empty () const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
void resize (int new_max_size)
int max_size () const
void clear ()
bool contains (int i) const
iterator insert (int i)
iterator insert_new (int i)

Private Member Functions

 Workq (const Workq &)=delete
Workq & operator= (const Workq &)=delete

Private Attributes

int n_
int maxmark_
int nextmark_
bool last_was_mark_

Additional Inherited Members

Public Types inherited from duckdb_re2::SparseSetT< void >
typedef int * iterator
typedef const int * const_iterator
Static Public Member Functions inherited from duckdb_re2::SparseSetT< void >
static bool less (int a, int b)

Constructor & Destructor Documentation

◆ Workq()

duckdb_re2::DFA::Workq::Workq ( int n,
int maxmark )
inline
462753 :
462754 SparseSet(n+maxmark),
462755 n_(n),
462756 maxmark_(maxmark),
462757 nextmark_(n),
462758 last_was_mark_(true) {
462759 }

Member Function Documentation

◆ is_mark()

bool duckdb_re2::DFA::Workq::is_mark ( int i)
inline
462761{ return i >= n_; }

◆ maxmark()

int duckdb_re2::DFA::Workq::maxmark ( )
inline
462763{ return maxmark_; }

◆ clear()

void duckdb_re2::DFA::Workq::clear ( )
inline
462765 {
462766 SparseSet::clear();
462767 nextmark_ = n_;
462768 }

◆ mark()

void duckdb_re2::DFA::Workq::mark ( )
inline
462770 {
462771 if (last_was_mark_)
462772 return;
462773 last_was_mark_ = false;
462774 SparseSet::insert_new(nextmark_++);
462775 }

◆ size()

int duckdb_re2::DFA::Workq::size ( )
inline
462777 {
462778 return n_ + maxmark_;
462779 }

◆ insert()

void duckdb_re2::DFA::Workq::insert ( int id)
inline
462781 {
462782 if (contains(id))
462783 return;
462784 insert_new(id);
462785 }

◆ insert_new()

void duckdb_re2::DFA::Workq::insert_new ( int id)
inline
462787 {
462788 last_was_mark_ = false;
462789 SparseSet::insert_new(id);
462790 }

The documentation for this class was generated from the following file: