Public Types | Public Member Functions

fst::RhoMatcher< M > Class Template Reference

#include <fst/matcher.h>

Inherits MatcherBase< M::Arc >.

Collaboration diagram for fst::RhoMatcher< M >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef M::FST FST
typedef M::Arc Arc
typedef Arc::StateId StateId
typedef Arc::Label Label
typedef Arc::Weight Weight

Public Member Functions

 RhoMatcher (const FST &fst, MatchType match_type, Label rho_label=kNoLabel, MatcherRewriteMode rewrite_mode=MATCHER_REWRITE_AUTO, M *matcher=0)
 RhoMatcher (const RhoMatcher< M > &matcher, bool safe=false)
virtual ~RhoMatcher ()
virtual RhoMatcher< M > * Copy (bool safe=false) const
virtual MatchType Type (bool test) const
void SetState (StateId s)
bool Find (Label match_label)
bool Done () const
const ArcValue () const
void Next ()
virtual const FSTGetFst () const
virtual uint64 Properties (uint64 props) const

Detailed Description

template<class M>
class fst::RhoMatcher< M >

For any requested label that doesn't match at a state, this matcher considers all transitions that match the label 'rho_label' (rho = 'rest'). Each such rho transition found is returned with the rho_label rewritten as the requested label (both sides if an acceptor, or if 'rewrite_both' is true and both input and output labels of the found transition are 'rho_label'). If 'rho_label' is kNoLabel, this special matching is not done. RhoMatcher is templated itself on a matcher, which is used to perform the underlying matching. By default, the underlying matcher is constructed by RhoMatcher. The user can instead pass in this object; in that case, RhoMatcher takes its ownership.

Definition at line 332 of file matcher.h.


Member Typedef Documentation

template<class M>
typedef M::Arc fst::RhoMatcher< M >::Arc

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 335 of file matcher.h.

template<class M>
typedef M::FST fst::RhoMatcher< M >::FST

Definition at line 334 of file matcher.h.

template<class M>
typedef Arc::Label fst::RhoMatcher< M >::Label

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 337 of file matcher.h.

template<class M>
typedef Arc::StateId fst::RhoMatcher< M >::StateId

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 336 of file matcher.h.

template<class M>
typedef Arc::Weight fst::RhoMatcher< M >::Weight

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 338 of file matcher.h.


Constructor & Destructor Documentation

template<class M>
fst::RhoMatcher< M >::RhoMatcher ( const FST fst,
MatchType  match_type,
Label  rho_label = kNoLabel,
MatcherRewriteMode  rewrite_mode = MATCHER_REWRITE_AUTO,
M *  matcher = 0 
) [inline]

Definition at line 340 of file matcher.h.

template<class M>
fst::RhoMatcher< M >::RhoMatcher ( const RhoMatcher< M > &  matcher,
bool  safe = false 
) [inline]

Definition at line 361 of file matcher.h.

template<class M>
virtual fst::RhoMatcher< M >::~RhoMatcher (  )  [inline, virtual]

Definition at line 367 of file matcher.h.


Member Function Documentation

template<class M>
virtual RhoMatcher<M>* fst::RhoMatcher< M >::Copy ( bool  safe = false  )  const [inline, virtual]

Implements fst::MatcherBase< M::Arc >.

Definition at line 371 of file matcher.h.

template<class M>
bool fst::RhoMatcher< M >::Done (  )  const [inline]

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 398 of file matcher.h.

template<class M>
bool fst::RhoMatcher< M >::Find ( Label  match_label  )  [inline]

Definition at line 382 of file matcher.h.

template<class M>
virtual const FST& fst::RhoMatcher< M >::GetFst (  )  const [inline, virtual]

Implements fst::MatcherBase< M::Arc >.

Definition at line 421 of file matcher.h.

template<class M>
void fst::RhoMatcher< M >::Next (  )  [inline]

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 419 of file matcher.h.

template<class M >
uint64 fst::RhoMatcher< M >::Properties ( uint64  props  )  const [inline, virtual]

Implements fst::MatcherBase< M::Arc >.

Definition at line 444 of file matcher.h.

template<class M>
void fst::RhoMatcher< M >::SetState ( StateId  s  )  [inline]

Definition at line 377 of file matcher.h.

template<class M>
virtual MatchType fst::RhoMatcher< M >::Type ( bool  test  )  const [inline, virtual]

Implements fst::MatcherBase< M::Arc >.

Definition at line 375 of file matcher.h.

template<class M>
const Arc& fst::RhoMatcher< M >::Value (  )  const [inline]

Reimplemented from fst::MatcherBase< M::Arc >.

Definition at line 400 of file matcher.h.


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