NaturalLess< CompactLatticeWeightTpl< LatticeWeightTpl< double >, int32 > > Class Template Reference

#include <lattice-weight.h>

Public Types

typedef CompactLatticeWeightTpl< LatticeWeightTpl< double >, int32 > Weight
 

Public Member Functions

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

Detailed Description

template<>
class fst::NaturalLess< CompactLatticeWeightTpl< LatticeWeightTpl< double >, int32 > >

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

Member Typedef Documentation

◆ Weight

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

Constructor & Destructor Documentation

◆ NaturalLess()

NaturalLess ( )
inline

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

641 {}

Member Function Documentation

◆ operator()()

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

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

References fst::Compare().

643  {
644  // NaturalLess is a negative order (opposite to normal ordering).
645  // This operator () corresponds to "<" in the negative order, which
646  // corresponds to the ">" in the normal order.
647  return (Compare(w1, w2) == 1);
648  }
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: