|
| void | init (int s, Transition t[], int f[], bool minimize=true) |
| | Initialize DFA.
|
| | DFA (void) |
| | Initialize for DFA accepting the empty word.
|
| | DFA (int s, Transition t[], int f[], bool minimize=true) |
| | Initialize DFA.
|
| | DFA (int s, std::initializer_list< Transition > t, std::initializer_list< int > f, bool minimize=true) |
| | Initialize DFA.
|
| | DFA (const DFA &d) |
| | Initialize by DFA d (DFA is shared).
|
| bool | operator== (const DFA &d) const |
| | Test whether DFA is equal to d.
|
| bool | operator!= (const DFA &d) const |
| | Test whether DFA is not equal to d.
|
| int | n_states (void) const |
| | Return the number of states.
|
| int | n_transitions (void) const |
| | Return the number of transitions.
|
| unsigned int | n_symbols (void) const |
| | Return the number of symbols.
|
| unsigned int | max_degree (void) const |
| | Return maximal degree (in-degree and out-degree) of any state.
|
| int | final_fst (void) const |
| | Return the number of the first final state.
|
| int | final_lst (void) const |
| | Return the number of the last final state.
|
| int | symbol_min (void) const |
| | Return smallest symbol in DFA.
|
| int | symbol_max (void) const |
| | Return largest symbol in DFA.
|
| std::size_t | hash (void) const |
| | Return hash key.
|
| Public Member Functions inherited from Gecode::SharedHandle |
| | SharedHandle (void) |
| | Create shared handle with no object pointing to.
|
| | SharedHandle (SharedHandle::Object *so) |
| | Create shared handle that points to shared object so.
|
| | SharedHandle (const SharedHandle &sh) |
| | Copy constructor maintaining reference count.
|
| SharedHandle & | operator= (const SharedHandle &sh) |
| | Assignment operator maintaining reference count.
|
| | ~SharedHandle (void) |
| | Destructor that maintains reference count.
|
| | operator bool (void) const |
| | Whether handle points to an object.
|
Finite automaton with deterministic construction by default.
The constructors and init() require deterministic transitions. Use nfa() to retain nondeterministic transitions without determinization or minimization. Every transition consumes one symbol; epsilon transitions are not supported.
After initialization, the start state is always zero. The final states are contiguous ranging from the first to the last final state.
Definition at line 2620 of file int.hh.
Construct a nondeterministic finite automaton.
Start state is s. The last transition in t must have -1 as its input state, and the last final state in f must be -1. Multiple transitions may share an input state and symbol. Every transition consumes one symbol; epsilon transitions are not supported. Unreachable states are removed, but the automaton is neither determinized nor minimized.
Definition at line 545 of file dfa.cpp.
| DFA Gecode::DFA::nfa |
( |
int | s, |
|
|
std::initializer_list< Transition > | t, |
|
|
std::initializer_list< int > | f ) |
|
static |
Construct a nondeterministic finite automaton from lists.
Start state is s, transitions are t, and final states are f. No sentinel elements are needed. As for the array overload, nondeterminism is retained and epsilon transitions are not supported.
Definition at line 550 of file dfa.cpp.