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

Convenience class that stores pointers to cell FSAs. These pointers are organized through a hash using a label built from (cc,x,y) as key. More...

#include <task.hifst.rtn.hpp>

Public Member Functions

 RTN ()
 constructor More...
 
fst::Fst< Arc > * operator() (const unsigned cc, const unsigned x, const unsigned y)
 If exists, returns pointer FSA for a given key. Otherwise returns NULL. More...
 
void Add (const unsigned cc, const unsigned x, const unsigned y, fst::Fst< Arc > *fst, fst::Fst< Arc > *fst2=NULL)
 Adds a new cell fsa to the rtn for coordinates cc,x,y, takes ownership of the pointer. fst is the pointer arc and fst2 contains the pointee fst. More...
 
void Add (const unsigned cc, const unsigned x, const unsigned y, boost::shared_ptr< fst::Fst< Arc > > fst, boost::shared_ptr< fst::Fst< Arc > > fst2)
 Adds a new cell fsa to the rtn for coordinates cc,x,y. More...
 
void clear ()
 Clears hash. More...
 
std::size_t size ()
 Returns size (number of FSAs) in the RTN/cyk grid. More...
 

Detailed Description

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

Convenience class that stores pointers to cell FSAs. These pointers are organized through a hash using a label built from (cc,x,y) as key.

Definition at line 34 of file task.hifst.rtn.hpp.

Constructor & Destructor Documentation

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

constructor

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

Member Function Documentation

template<class Arc >
void ucam::hifst::RTN< Arc >::Add ( const unsigned  cc,
const unsigned  x,
const unsigned  y,
fst::Fst< Arc > *  fst,
fst::Fst< Arc > *  fst2 = NULL 
)
inline

Adds a new cell fsa to the rtn for coordinates cc,x,y, takes ownership of the pointer. fst is the pointer arc and fst2 contains the pointee fst.

Definition at line 57 of file task.hifst.rtn.hpp.

template<class Arc >
void ucam::hifst::RTN< Arc >::Add ( const unsigned  cc,
const unsigned  x,
const unsigned  y,
boost::shared_ptr< fst::Fst< Arc > >  fst,
boost::shared_ptr< fst::Fst< Arc > >  fst2 
)
inline

Adds a new cell fsa to the rtn for coordinates cc,x,y.

Definition at line 68 of file task.hifst.rtn.hpp.

template<class Arc >
void ucam::hifst::RTN< Arc >::clear ( )
inline

Clears hash.

Definition at line 79 of file task.hifst.rtn.hpp.

template<class Arc >
fst::Fst<Arc>* ucam::hifst::RTN< Arc >::operator() ( const unsigned  cc,
const unsigned  x,
const unsigned  y 
)
inline

If exists, returns pointer FSA for a given key. Otherwise returns NULL.

Definition at line 48 of file task.hifst.rtn.hpp.

template<class Arc >
std::size_t ucam::hifst::RTN< Arc >::size ( )
inline

Returns size (number of FSAs) in the RTN/cyk grid.

Definition at line 84 of file task.hifst.rtn.hpp.


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