All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
LatticeDeterminizer< Weight, IntType >::SubsetEqual Class Reference
Collaboration diagram for LatticeDeterminizer< Weight, IntType >::SubsetEqual:

Public Member Functions

bool operator() (const vector< Element > *s1, const vector< Element > *s2) const
 
 SubsetEqual (float delta)
 
 SubsetEqual ()
 

Public Attributes

float delta_
 

Detailed Description

template<class Weight, class IntType>
class fst::LatticeDeterminizer< Weight, IntType >::SubsetEqual

Definition at line 593 of file determinize-lattice-inl.h.

Constructor & Destructor Documentation

SubsetEqual ( float  delta)
inline

Definition at line 609 of file determinize-lattice-inl.h.

SubsetEqual ( )
inline

Definition at line 610 of file determinize-lattice-inl.h.

Member Function Documentation

bool operator() ( const vector< Element > *  s1,
const vector< Element > *  s2 
) const
inline

Definition at line 595 of file determinize-lattice-inl.h.

References kaldi::ApproxEqual().

595  {
596  size_t sz = s1->size();
597  assert(sz>=0);
598  if (sz != s2->size()) return false;
599  typename vector<Element>::const_iterator iter1 = s1->begin(),
600  iter1_end = s1->end(), iter2=s2->begin();
601  for (; iter1 < iter1_end; ++iter1, ++iter2) {
602  if (iter1->state != iter2->state ||
603  iter1->string != iter2->string ||
604  ! ApproxEqual(iter1->weight, iter2->weight, delta_)) return false;
605  }
606  return true;
607  }
bool ApproxEqual(const LatticeWeightTpl< FloatType > &w1, const LatticeWeightTpl< FloatType > &w2, float delta=kDelta)

Member Data Documentation

float delta_

Definition at line 608 of file determinize-lattice-inl.h.


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