Public Types | Public Member Functions

fst::SortedMatcher< F > Class Template Reference

#include <fst/matcher.h>

Inherits MatcherBase< F::Arc >.

Collaboration diagram for fst::SortedMatcher< F >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef F FST
typedef F::Arc Arc
typedef Arc::StateId StateId
typedef Arc::Label Label
typedef Arc::Weight Weight

Public Member Functions

 SortedMatcher (const F &fst, MatchType match_type, Label binary_label=1)
 SortedMatcher (const SortedMatcher< F > &matcher, bool safe=false)
virtual ~SortedMatcher ()
virtual SortedMatcher< F > * 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 F & GetFst () const
virtual uint64 Properties (uint64 props) const

Detailed Description

template<class F>
class fst::SortedMatcher< F >

A matcher that expects sorted labels on the side to be matched. If match_type == MATCH_INPUT, epsilons match the implicit self loop Arc(kNoLabel, 0, Weight::One(), current_state) as well as any actual epsilon transitions. If match_type == MATCH_OUTPUT, then Arc(0, kNoLabel, Weight::One(), current_state) is instead matched.

Definition at line 126 of file matcher.h.


Member Typedef Documentation

template<class F>
typedef F::Arc fst::SortedMatcher< F >::Arc

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

Definition at line 129 of file matcher.h.

template<class F>
typedef F fst::SortedMatcher< F >::FST

Definition at line 128 of file matcher.h.

template<class F>
typedef Arc::Label fst::SortedMatcher< F >::Label

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

Definition at line 131 of file matcher.h.

template<class F>
typedef Arc::StateId fst::SortedMatcher< F >::StateId

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

Definition at line 130 of file matcher.h.

template<class F>
typedef Arc::Weight fst::SortedMatcher< F >::Weight

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

Definition at line 132 of file matcher.h.


Constructor & Destructor Documentation

template<class F>
fst::SortedMatcher< F >::SortedMatcher ( const F &  fst,
MatchType  match_type,
Label  binary_label = 1 
) [inline]

Labels >= binary_label will be searched for by binary search, o.w. linear search is used.

Definition at line 136 of file matcher.h.

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

Definition at line 158 of file matcher.h.

template<class F>
virtual fst::SortedMatcher< F >::~SortedMatcher (  )  [inline, virtual]

Definition at line 168 of file matcher.h.


Member Function Documentation

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

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

Definition at line 174 of file matcher.h.

template<class F>
bool fst::SortedMatcher< F >::Done (  )  const [inline]

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

Definition at line 212 of file matcher.h.

template<class F >
bool fst::SortedMatcher< F >::Find ( Label  match_label  )  [inline]

Definition at line 258 of file matcher.h.

template<class F>
virtual const F& fst::SortedMatcher< F >::GetFst (  )  const [inline, virtual]

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

Definition at line 233 of file matcher.h.

template<class F>
void fst::SortedMatcher< F >::Next (  )  [inline]

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

Definition at line 226 of file matcher.h.

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

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

Definition at line 235 of file matcher.h.

template<class F>
void fst::SortedMatcher< F >::SetState ( StateId  s  )  [inline]

Definition at line 196 of file matcher.h.

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

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

Definition at line 178 of file matcher.h.

template<class F>
const Arc& fst::SortedMatcher< F >::Value (  )  const [inline]

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

Definition at line 222 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