Public Types | Public Member Functions

fst::TopOrderVisitor< A > Class Template Reference

DFS visitor class to return topological ordering. More...

#include <fst/topsort.h>

Collaboration diagram for fst::TopOrderVisitor< A >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef A Arc
typedef A::StateId StateId

Public Member Functions

 TopOrderVisitor (vector< StateId > *order, bool *acyclic)
void InitVisit (const Fst< A > &fst)
bool InitState (StateId s, StateId r)
bool TreeArc (StateId s, const A &arc)
bool BackArc (StateId s, const A &arc)
bool ForwardOrCrossArc (StateId s, const A &arc)
void FinishState (StateId s, StateId p, const A *)
void FinishVisit ()

Detailed Description

template<class A>
class fst::TopOrderVisitor< A >

DFS visitor class to return topological ordering.

Definition at line 36 of file topsort.h.


Member Typedef Documentation

template<class A>
typedef A fst::TopOrderVisitor< A >::Arc

Definition at line 38 of file topsort.h.

template<class A>
typedef A::StateId fst::TopOrderVisitor< A >::StateId

Definition at line 39 of file topsort.h.


Constructor & Destructor Documentation

template<class A>
fst::TopOrderVisitor< A >::TopOrderVisitor ( vector< StateId > *  order,
bool *  acyclic 
) [inline]

If acyclic, ORDER[i] gives the topological position of state Id i; otherwise unchanged. ACYCLIC will be true iff the FST has no cycles.

Definition at line 44 of file topsort.h.


Member Function Documentation

template<class A>
bool fst::TopOrderVisitor< A >::BackArc ( StateId  s,
const A &  arc 
) [inline]

Definition at line 56 of file topsort.h.

template<class A>
void fst::TopOrderVisitor< A >::FinishState ( StateId  s,
StateId  p,
const A *   
) [inline]

Definition at line 60 of file topsort.h.

template<class A>
void fst::TopOrderVisitor< A >::FinishVisit (  )  [inline]

Definition at line 62 of file topsort.h.

template<class A>
bool fst::TopOrderVisitor< A >::ForwardOrCrossArc ( StateId  s,
const A &  arc 
) [inline]

Definition at line 58 of file topsort.h.

template<class A>
bool fst::TopOrderVisitor< A >::InitState ( StateId  s,
StateId  r 
) [inline]

Definition at line 52 of file topsort.h.

template<class A>
void fst::TopOrderVisitor< A >::InitVisit ( const Fst< A > &  fst  )  [inline]

Definition at line 47 of file topsort.h.

template<class A>
bool fst::TopOrderVisitor< A >::TreeArc ( StateId  s,
const A &  arc 
) [inline]

Definition at line 54 of file topsort.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines