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

#include <lattice-weight.h>

Public Types

typedef LatticeWeightTpl
< FloatType > 

Public Member Functions

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

Detailed Description

template<class FloatType>
class fst::NaturalLess< LatticeWeightTpl< FloatType > >

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

Member Typedef Documentation

typedef LatticeWeightTpl<FloatType> Weight

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

Member Function Documentation

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

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

References fst::Compare().

323  {
324  // NaturalLess is a negative order (opposite to normal ordering).
325  // This operator () corresponds to "<" in the negative order, which
326  // corresponds to the ">" in the normal order.
327  return (Compare(w1, w2) == 1);
328  }
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: