LatticeDeterminizerPruned< Weight, IntType >::SubsetKey Class Reference

Public Member Functions

size_t operator() (const vector< Element > *subset) const
 

Detailed Description

template<class Weight, class IntType>
class fst::LatticeDeterminizerPruned< Weight, IntType >::SubsetKey

Definition at line 436 of file determinize-lattice-pruned.cc.

Member Function Documentation

◆ operator()()

size_t operator() ( const vector< Element > *  subset) const
inline

Definition at line 438 of file determinize-lattice-pruned.cc.

438  { // hashes only the state and string.
439  size_t hash = 0, factor = 1;
440  for (typename vector<Element>::const_iterator iter= subset->begin(); iter != subset->end(); ++iter) {
441  hash *= factor;
442  hash += iter->state + reinterpret_cast<size_t>(iter->string);
443  factor *= 23531; // these numbers are primes.
444  }
445  return hash;
446  }

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