Moses::BlockHashIndex Class Reference

#include <BlockHashIndex.h>

Collaboration diagram for Moses::BlockHashIndex:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BlockHashIndex (size_t orderBits, size_t fingerPrintBits)
 ~BlockHashIndex ()
size_t GetHash (const char *key)
size_t GetHash (std::string key)
size_t operator[] (std::string key)
size_t operator[] (char *key)
void BeginSave (std::FILE *mphf)
void SaveRange (size_t i)
void SaveLastRange ()
size_t FinalizeSave ()
void DropRange (size_t i)
void DropLastRange ()
size_t LoadIndex (std::FILE *mphf)
void LoadRange (size_t i)
size_t Save (std::string filename)
size_t Save (std::FILE *mphf)
size_t Load (std::string filename)
size_t Load (std::FILE *mphf)
size_t GetSize () const
void KeepNLastRanges (float ratio=0.1, float tolerance=0.1)
template<typename Keys >
void AddRange (Keys &keys)
template<typename Keys >
void CalcHash (size_t current, Keys &keys)
void CalcHash (size_t current, void *source)


Detailed Description

Definition at line 50 of file BlockHashIndex.h.


Constructor & Destructor Documentation

Moses::BlockHashIndex::BlockHashIndex ( size_t  orderBits,
size_t  fingerPrintBits 
)

Definition at line 48 of file BlockHashIndex.cpp.

Moses::BlockHashIndex::~BlockHashIndex (  ) 

Definition at line 60 of file BlockHashIndex.cpp.


Member Function Documentation

template<typename Keys >
void Moses::BlockHashIndex::AddRange ( Keys &  keys  )  [inline]

void Moses::BlockHashIndex::BeginSave ( std::FILE *  mphf  ) 

Definition at line 146 of file BlockHashIndex.cpp.

References ftell(), and ThrowingFwrite().

Referenced by Moses::LexicalReorderingTableCreator::LexicalReorderingTableCreator(), Moses::PhraseTableCreator::PhraseTableCreator(), and Save().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::BlockHashIndex::CalcHash ( size_t  current,
void *  source 
)

Definition at line 346 of file BlockHashIndex.cpp.

References Moses::PairedPackedArray< T, D >::Set(), util::StringStream::str(), and UTIL_THROW2.

Here is the call graph for this function:

template<typename Keys >
void Moses::BlockHashIndex::CalcHash ( size_t  current,
Keys &  keys 
) [inline]

Definition at line 175 of file BlockHashIndex.h.

Referenced by AddRange().

Here is the caller graph for this function:

void Moses::BlockHashIndex::DropLastRange (  ) 

Definition at line 199 of file BlockHashIndex.cpp.

References DropRange().

Here is the call graph for this function:

void Moses::BlockHashIndex::DropRange ( size_t  i  ) 

Definition at line 183 of file BlockHashIndex.cpp.

Referenced by DropLastRange().

Here is the caller graph for this function:

size_t Moses::BlockHashIndex::FinalizeSave (  ) 

Definition at line 216 of file BlockHashIndex.cpp.

References fseek(), ftell(), Moses::StringVector< ValueT, PosT, Allocator >::save(), SaveLastRange(), and ThrowingFwrite().

Referenced by Save().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t Moses::BlockHashIndex::GetHash ( std::string  key  ) 

Definition at line 123 of file BlockHashIndex.cpp.

size_t Moses::BlockHashIndex::GetHash ( const char *  key  ) 

Definition at line 75 of file BlockHashIndex.cpp.

References Moses::StringVector< ValueT, PosT, Allocator >::begin(), Moses::StringVector< ValueT, PosT, Allocator >::end(), and GetSize().

Here is the call graph for this function:

size_t Moses::BlockHashIndex::GetSize (  )  const

Definition at line 319 of file BlockHashIndex.cpp.

Referenced by Moses::PhraseDecoder::CreateTargetPhraseCollection(), GetHash(), Moses::LexicalReorderingTableCompact::GetScore(), and GetScore().

Here is the caller graph for this function:

void Moses::BlockHashIndex::KeepNLastRanges ( float  ratio = 0.1,
float  tolerance = 0.1 
)

Definition at line 324 of file BlockHashIndex.cpp.

size_t Moses::BlockHashIndex::Load ( std::FILE *  mphf  ) 

Definition at line 308 of file BlockHashIndex.cpp.

References end, fseek(), ftell(), LoadIndex(), and LoadRange().

Here is the call graph for this function:

size_t Moses::BlockHashIndex::Load ( std::string  filename  ) 

Definition at line 300 of file BlockHashIndex.cpp.

Referenced by Moses::PhraseDictionaryCompact::Load(), Moses::LexicalReorderingTableCompact::Load(), and Load().

Here is the caller graph for this function:

size_t Moses::BlockHashIndex::LoadIndex ( std::FILE *  mphf  ) 

Definition at line 252 of file BlockHashIndex.cpp.

References end, fseek(), ftell(), Moses::StringVector< ValueT, PosT, Allocator >::load(), and read().

Referenced by Load().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::BlockHashIndex::LoadRange ( size_t  i  ) 

Definition at line 284 of file BlockHashIndex.cpp.

References fseek().

Referenced by Load().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t Moses::BlockHashIndex::operator[] ( char *  key  ) 

Definition at line 133 of file BlockHashIndex.cpp.

size_t Moses::BlockHashIndex::operator[] ( std::string  key  ) 

Definition at line 128 of file BlockHashIndex.cpp.

size_t Moses::BlockHashIndex::Save ( std::FILE *  mphf  ) 

Definition at line 243 of file BlockHashIndex.cpp.

References BeginSave(), FinalizeSave(), and SaveRange().

Here is the call graph for this function:

size_t Moses::BlockHashIndex::Save ( std::string  filename  ) 

Definition at line 138 of file BlockHashIndex.cpp.

void Moses::BlockHashIndex::SaveLastRange (  ) 

Definition at line 169 of file BlockHashIndex.cpp.

References SaveRange().

Referenced by FinalizeSave().

Here is the call graph for this function:

Here is the caller graph for this function:

void Moses::BlockHashIndex::SaveRange ( size_t  i  ) 

Definition at line 158 of file BlockHashIndex.cpp.

References ftell().

Referenced by Save(), and SaveLastRange().

Here is the call graph for this function:

Here is the caller graph for this function:


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

Generated on Thu Jul 6 00:33:37 2017 for Moses by  doxygen 1.5.9