Gecode::DFA Class Reference
[Regular constraints]
#include <int.hh>
Detailed Description
Deterministic finite automaton.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 672 of file int.hh.
Public Member Functions | |
DFA (void) | |
Default constructor (empty DFA). | |
DFA (int s, Transition t[], int f[], bool minimize=true) | |
Initialize DFA by transitions. | |
DFA (REG &r) | |
Initialize DFA by regular expression r. | |
DFA (const DFA &d) | |
Initialize by DFA d (DFA is shared). | |
const DFA & | operator= (const DFA &) |
Initialize by DFA d (DFA is shared). | |
~DFA (void) | |
Destructor. | |
void | update (bool share, DFA &d) |
Update this DFA to d. | |
unsigned int | n_states (void) const |
Return the number of states. | |
unsigned int | n_transitions (void) const |
Return the number of transitions. | |
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. | |
Protected Member Functions | |
void | init (int start, Transition t_spec[], int f_spec[], bool minimize) |
Initialize automaton. | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &, const Gecode::DFA &d) |
Classes | |
class | DFAI |
Data stored for a DFA. More... | |
class | Transitions |
Iterator for transitions (sorted by symbols/values). More... | |
class | Transition |
Specification of a DFA transition. More... |
Constructor & Destructor Documentation
|
Default constructor (empty DFA).
|
|
Initialize DFA by transitions.
|
|
Initialize DFA by regular expression r.
|
|
Initialize by DFA d (DFA is shared).
|
|
Destructor.
|
Member Function Documentation
|
Initialize automaton. Start state start, transition specification t_spec, final state specification f_spec and a flag minimize whether the automaton should be minimized |
|
Initialize by DFA d (DFA is shared).
|
|
Update this DFA to d. If share is true, share the same d. If not, create an independent copy from d. |
|
Return the number of states.
|
|
Return the number of transitions.
|
|
Return the number of the first final state.
|
|
Return the number of the last final state.
|
|
Return smallest symbol in DFA.
|
|
Return largest symbol in DFA.
|
Friends And Related Function Documentation
|
Print DFA d |
The documentation for this class was generated from the following files:
- gecode/int.hh (Revision: 3579)
- gecode/int/regular/dfa.cc (Revision: 3512)
- gecode/int/regular/dfa.icc (Revision: 3512)
- gecode/int/regular/reg.cc (Revision: 3512)