lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT > Class Template Reference

#include <search_hashed.hh>

Inheritance diagram for lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >:

Inheritance graph
[legend]
Collaboration diagram for lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef MiddleT Middle
typedef LongestT Longest
typedef std::vector< Middle >
::const_iterator 
MiddleIter

Public Member Functions

uint8_t * SetupMemory (uint8_t *start, const std::vector< uint64_t > &counts, const Config &config)
template<class Voc >
void InitializeFromARPA (const char *file, util::FilePiece &f, const std::vector< uint64_t > &counts, const Config &config, Voc &vocab, Backing &backing)
MiddleIter MiddleBegin () const
MiddleIter MiddleEnd () const
Node Unpack (uint64_t extend_pointer, unsigned char extend_length, float &prob) const
bool LookupMiddle (const Middle &middle, WordIndex word, float &backoff, Node &node, FullScoreReturn &ret) const
void LoadedBinary ()
bool LookupMiddleNoProb (const Middle &middle, WordIndex word, float &backoff, Node &node) const
bool LookupLongest (WordIndex word, float &prob, Node &node) const
bool FastMakeNode (const WordIndex *begin, const WordIndex *end, Node &node) const

Static Public Member Functions

static void UpdateConfigFromBinary (int, const std::vector< uint64_t > &, Config &)
static std::size_t Size (const std::vector< uint64_t > &counts, const Config &config)

Public Attributes

Longest longest

Static Public Attributes

static const unsigned int kVersion = 0


Detailed Description

template<class MiddleT, class LongestT>
class lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >

Definition at line 70 of file search_hashed.hh.


Member Typedef Documentation

template<class MiddleT, class LongestT>
typedef LongestT lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::Longest

Definition at line 74 of file search_hashed.hh.

template<class MiddleT, class LongestT>
typedef MiddleT lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::Middle

Definition at line 72 of file search_hashed.hh.

template<class MiddleT, class LongestT>
typedef std::vector<Middle>::const_iterator lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::MiddleIter

Definition at line 94 of file search_hashed.hh.


Member Function Documentation

template<class MiddleT, class LongestT>
bool lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::FastMakeNode ( const WordIndex begin,
const WordIndex end,
Node node 
) const [inline]

Definition at line 151 of file search_hashed.hh.

template<class MiddleT , class LongestT >
template<class Voc >
void lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::InitializeFromARPA ( const char *  file,
util::FilePiece f,
const std::vector< uint64_t > &  counts,
const Config config,
Voc &  vocab,
Backing backing 
) [inline]

template<class MiddleT , class LongestT >
void lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::LoadedBinary (  )  [inline]

template<class MiddleT, class LongestT>
bool lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::LookupLongest ( WordIndex  word,
float &  prob,
Node node 
) const [inline]

Definition at line 140 of file search_hashed.hh.

template<class MiddleT, class LongestT>
bool lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::LookupMiddle ( const Middle middle,
WordIndex  word,
float &  backoff,
Node node,
FullScoreReturn ret 
) const [inline]

Definition at line 116 of file search_hashed.hh.

template<class MiddleT, class LongestT>
bool lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::LookupMiddleNoProb ( const Middle middle,
WordIndex  word,
float &  backoff,
Node node 
) const [inline]

Definition at line 132 of file search_hashed.hh.

template<class MiddleT, class LongestT>
MiddleIter lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::MiddleBegin (  )  const [inline]

Definition at line 96 of file search_hashed.hh.

template<class MiddleT, class LongestT>
MiddleIter lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::MiddleEnd (  )  const [inline]

Definition at line 97 of file search_hashed.hh.

template<class MiddleT , class LongestT >
uint8_t * lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::SetupMemory ( uint8_t *  start,
const std::vector< uint64_t > &  counts,
const Config config 
) [inline]

template<class MiddleT, class LongestT>
static std::size_t lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::Size ( const std::vector< uint64_t > &  counts,
const Config config 
) [inline, static]

template<class MiddleT, class LongestT>
Node lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::Unpack ( uint64_t  extend_pointer,
unsigned char  extend_length,
float &  prob 
) const [inline]

Definition at line 99 of file search_hashed.hh.

template<class MiddleT, class LongestT>
static void lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::UpdateConfigFromBinary ( int  ,
const std::vector< uint64_t > &  ,
Config  
) [inline, static]

Definition at line 80 of file search_hashed.hh.


Member Data Documentation

template<class MiddleT, class LongestT>
const unsigned int lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::kVersion = 0 [static]

Definition at line 77 of file search_hashed.hh.

template<class MiddleT, class LongestT>
Longest lm::ngram::detail::TemplateHashedSearch< MiddleT, LongestT >::longest


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

Generated on Wed Apr 11 09:04:11 2012 for Moses by  doxygen 1.5.9