Cambridge SMT System
ucam::hifst::ExpandedNumStatesRTN< Arc > Class Template Reference

Utility class that, given an RTN with root at (cc,x,y), estimates the number of states of an expanded FSA The RTN is not explicitly passed to this class. Instead, it is updated sequentially as individual FSAs are created. More...

#include <task.hifst.expandednumstates.hpp>

Public Member Functions

 ExpandedNumStatesRTN ()
 Constructor. More...
 
uint operator() (uint cc, uint x, uint y)
 Returns estimated number of states for an rtn with a root fst at (cc,x,y) More...
 
void update (uint cc, uint x, uint y, fst::VectorFst< Arc > *myfst)
 Estimates (expanded) number of states of rtn_[cc][x][y] Traverses arcs and and add number of states of other lower-level rtns. Assuming minimized FSA, substract number 2 per lowel level rtn: 1 for final state and another for for initial state. This should provide a good estimate of the size of the expanded fst (equivalent roughly to Replace+RmEpsilon). More...
 

Detailed Description

template<class Arc>
class ucam::hifst::ExpandedNumStatesRTN< Arc >

Utility class that, given an RTN with root at (cc,x,y), estimates the number of states of an expanded FSA The RTN is not explicitly passed to this class. Instead, it is updated sequentially as individual FSAs are created.

Definition at line 36 of file task.hifst.expandednumstates.hpp.

Constructor & Destructor Documentation

template<class Arc>
ucam::hifst::ExpandedNumStatesRTN< Arc >::ExpandedNumStatesRTN ( )
inline

Constructor.

Definition at line 42 of file task.hifst.expandednumstates.hpp.

Member Function Documentation

template<class Arc>
uint ucam::hifst::ExpandedNumStatesRTN< Arc >::operator() ( uint  cc,
uint  x,
uint  y 
)
inline

Returns estimated number of states for an rtn with a root fst at (cc,x,y)

Definition at line 45 of file task.hifst.expandednumstates.hpp.

template<class Arc>
void ucam::hifst::ExpandedNumStatesRTN< Arc >::update ( uint  cc,
uint  x,
uint  y,
fst::VectorFst< Arc > *  myfst 
)
inline

Estimates (expanded) number of states of rtn_[cc][x][y] Traverses arcs and and add number of states of other lower-level rtns. Assuming minimized FSA, substract number 2 per lowel level rtn: 1 for final state and another for for initial state. This should provide a good estimate of the size of the expanded fst (equivalent roughly to Replace+RmEpsilon).

Parameters
ccNon-terminal id (starting at 1)
xPosition in sentence (starting at 0)
ySpan - 1.
myfstPointer to an fst corresponding to cell cc,x,y

Definition at line 61 of file task.hifst.expandednumstates.hpp.

Here is the caller graph for this function:


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