#include <int.hh>
Inherits Gecode::SharedHandle.
List of all members.
Detailed Description
Deterministic finite automaton (DFA).
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 1484 of file int.hh.
Constructor & Destructor Documentation
Gecode::DFA::DFA |
( |
void |
|
) |
[inline] |
Initialize for DFA accepting the empty word.
Definition at line 94 of file dfa.icc.
Gecode::DFA::DFA |
( |
int |
s, |
|
|
Transition |
t[], |
|
|
int |
f[], |
|
|
bool |
minimize = true | |
|
) |
| | |
Initialize DFA.
- Start state is given by s.
- Transitions are described by t, where the last element must have -1 as value for
i_state
. - Final states are given by f, where the last final element must be -1.
- Minimizes the DFA, if minimize is true.
- Note that the transitions must be deterministic.
Definition at line 155 of file dfa.cc.
Gecode::DFA::DFA |
( |
const DFA & |
d |
) |
[inline] |
Initialize by DFA d (DFA is shared).
Definition at line 98 of file dfa.icc.
Initialize DFA from reflection specification.
Definition at line 440 of file dfa.cc.
Member Function Documentation
unsigned int Gecode::DFA::n_states |
( |
void |
|
) |
const [inline] |
Return the number of states.
Definition at line 102 of file dfa.icc.
unsigned int Gecode::DFA::n_symbols |
( |
void |
|
) |
const [inline] |
Return the number of symbols.
Definition at line 108 of file dfa.icc.
unsigned int Gecode::DFA::n_transitions |
( |
void |
|
) |
const [inline] |
Return the number of transitions.
Definition at line 114 of file dfa.icc.
int Gecode::DFA::final_fst |
( |
void |
|
) |
const [inline] |
Return the number of the first final state.
Definition at line 120 of file dfa.icc.
int Gecode::DFA::final_lst |
( |
void |
|
) |
const [inline] |
Return the number of the last final state.
Definition at line 126 of file dfa.icc.
int Gecode::DFA::symbol_min |
( |
void |
|
) |
const [inline] |
Return smallest symbol in DFA.
Definition at line 132 of file dfa.icc.
int Gecode::DFA::symbol_max |
( |
void |
|
) |
const [inline] |
Return largest symbol in DFA.
Definition at line 139 of file dfa.icc.
Create reflection specification for the DFA.
Definition at line 470 of file dfa.cc.
Friends And Related Function Documentation
std::ostream & operator<< |
( |
std::ostream & |
, |
|
|
const Gecode::DFA & |
d | |
|
) |
| | [related] |
The documentation for this class was generated from the following files: