Generated on Mon Aug 25 11:35:48 2008 for Gecode by doxygen 1.5.6

Gecode::DFA Class Reference
[Extensional constraints]

#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.


Public Member Functions

 DFA (void)
 Initialize for DFA accepting the empty word.
 DFA (int s, Transition t[], int f[], bool minimize=true)
 Initialize DFA.
 DFA (const DFA &d)
 Initialize by DFA d (DFA is shared).
unsigned int n_states (void) const
 Return the number of states.
unsigned int n_symbols (void) const
 Return the number of symbols.
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.
 DFA (Reflection::VarMap &vm, Reflection::Arg *arg)
 Initialize DFA from reflection specification.
Reflection::Argspec (Reflection::VarMap &vm) const
 Create reflection specification for the DFA.

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  Symbols
 Iterator for DFA symbols. More...
class  Transition
 Specification of a DFA transition. More...
class  Transitions
 Iterator for DFA transitions (sorted by symbols). More...

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.

Gecode::DFA::DFA ( Reflection::VarMap vm,
Reflection::Arg arg 
)

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.

Reflection::Arg * Gecode::DFA::spec ( Reflection::VarMap vm  )  const

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]

Print DFA d

Definition at line 537 of file dfa.cc.


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