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 45 of file determinize-star-inl.h.

Member Function Documentation

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

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

47  {
48  assert(vec != NULL);
49  size_t hash = 0, factor = 1;
50  for (typename vector<Label>::const_iterator it = vec->begin();
51  it != vec->end(); it++) {
52  hash += factor*(*it);
53  factor *= 103333; // just an arbitrary prime number.
54  }
55  return hash;
56  }

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