LatticeDeterminizer< Weight, IntType >::SubsetKey Class Reference

Public Member Functions

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

Detailed Description

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

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

Member Function Documentation

◆ operator()()

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

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

580  { // hashes only the state and string.
581  size_t hash = 0, factor = 1;
582  for (typename std::vector<Element>::const_iterator iter= subset->begin(); iter != subset->end(); ++iter) {
583  hash *= factor;
584  hash += iter->state + reinterpret_cast<size_t>(iter->string);
585  factor *= 23531; // these numbers are primes.
586  }
587  return hash;
588  }

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