|
| tNFA (size_t num_states=1, size_t start_state=0) |
|
| tNFA (const tNFA< S, STOP_TYPE > &)=default |
|
| ~tNFA () |
|
tNFA< S, STOP_TYPE > & | operator= (const tNFA< S, STOP_TYPE > &)=default |
|
size_t | GetSize () const |
| Return the current number of states. More...
|
|
const std::set< size_t > & | GetStart () const |
| Return start state and all others reachable through empty transitions. More...
|
|
std::set< size_t > | GetNext (size_t sym, size_t from_id=0) const |
| Return the states reachable from the current state given the provided symbol. More...
|
|
std::set< size_t > | GetNext (size_t sym, const std::set< size_t > from_set) const |
| return the states reachable from the current set of states given the provided symbol. More...
|
|
bool | HasFreeTransitions (size_t id) const |
| Does the provided state have free transitions? More...
|
|
bool | HasSymTransitions (size_t id) const |
| Does the provided state have symbol-transitions? More...
|
|
opts_t | GetSymbolOptions (const std::set< size_t > &test_set) const |
| Return an emp::BitSet indicating the symbols available from the provided set of states. More...
|
|
void | Resize (size_t new_size) |
| Change the number of available states. More...
|
|
size_t | AddNewState () |
| Add a new state into the NFA and return its id. More...
|
|
void | AddTransition (size_t from, size_t to, size_t sym) |
| Add a transition between states 'from' and 'to' that can be taken with the provided symbol. More...
|
|
void | AddTransition (size_t from, size_t to, const std::string &sym_set) |
| Add a transition between states 'from' and 'to' that can be taken with the provided symbols. More...
|
|
void | AddTransition (size_t from, size_t to, const BitSet< NUM_SYMBOLS > &sym_set) |
| Add a transition between states 'from' and 'to' that can be taken with the provided symbols. More...
|
|
void | AddFreeTransition (size_t from, size_t to) |
| Create a free transition between 'from' and 'to'. More...
|
|
template<typename T = stop_t> |
void | SetStop (size_t state, T stop_val=1) |
| Set the specified state to be a stop state (with an optional stop value.) More...
|
|
stop_t | GetStop (size_t state) const |
| Get any stop value associated with the provided state. More...
|
|
bool | IsStart (size_t state) const |
| Test if NFA begins at provided state (may have free transitions to other states) More...
|
|
bool | IsStop (size_t state) const |
| Test if this state is a legal endpoint for the NFA. More...
|
|
bool | IsEmpty (size_t state) const |
| Test if this state has only empty transitions from it, and not stop state. More...
|
|
void | Merge (const tNFA< NUM_SYMBOLS, STOP_TYPE > &nfa2) |
| Merge another NFA into this one. More...
|
|
void | Print () const |
| Print information about this NFA (for debugging) More...
|
|
void | PrintFreeMoves () |
| Identify free moves in NFA (for debugging) More...
|
|
template<size_t S = 128, typename STOP_TYPE = uint8_t>
class emp::tNFA< S, STOP_TYPE >
A dynamic NFA class, for easily building non-determanistic finite automata.