All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
NaturalLess< CompactLatticeWeightTpl< LatticeWeightTpl< FloatType >, IntType > > Class Template Reference

#include <lattice-weight.h>

Public Types

typedef
CompactLatticeWeightTpl
< LatticeWeightTpl< FloatType >
, IntType > 
Weight
 

Public Member Functions

 NaturalLess ()
 
bool operator() (const Weight &w1, const Weight &w2) const
 

Detailed Description

template<class FloatType, class IntType>
class fst::NaturalLess< CompactLatticeWeightTpl< LatticeWeightTpl< FloatType >, IntType > >

Definition at line 582 of file lattice-weight.h.

Member Typedef Documentation

typedef CompactLatticeWeightTpl<LatticeWeightTpl<FloatType>, IntType> Weight

Definition at line 584 of file lattice-weight.h.

Constructor & Destructor Documentation

NaturalLess ( )
inline

Definition at line 586 of file lattice-weight.h.

586 {}

Member Function Documentation

bool operator() ( const Weight w1,
const Weight w2 
) const
inline

Definition at line 588 of file lattice-weight.h.

References fst::Compare().

588  {
589  // NaturalLess is a negative order (opposite to normal ordering).
590  // This operator () corresponds to "<" in the negative order, which
591  // corresponds to the ">" in the normal order.
592  return (Compare(w1, w2) == 1);
593  }
int Compare(const LatticeWeightTpl< FloatType > &w1, const LatticeWeightTpl< FloatType > &w2)
Compare returns -1 if w1 < w2, +1 if w1 > w2, and 0 if w1 == w2.

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