All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
StringRepository< Label, StringId >::VectorKey Class Reference

#include <determinize-star-inl.h>

Public Member Functions

size_t operator() (const vector< Label > *vec) const
 

Detailed Description

template<class Label, class StringId>
class fst::StringRepository< Label, StringId >::VectorKey

Definition at line 53 of file determinize-star-inl.h.

Member Function Documentation

size_t operator() ( const vector< Label > *  vec) const
inline

Definition at line 55 of file determinize-star-inl.h.

55  {
56  assert(vec != NULL);
57  size_t hash = 0, factor = 1;
58  for (typename vector<Label>::const_iterator it = vec->begin();
59  it != vec->end(); it++) {
60  hash += factor*(*it);
61  factor *= 103333; // just an arbitrary prime number.
62  }
63  return hash;
64  }

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