lm::ModelBuffer Class Reference

#include <model_buffer.hh>

Collaboration diagram for lm::ModelBuffer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ModelBuffer (StringPiece file_base, bool keep_buffer, bool output_q)
 ModelBuffer (StringPiece file_base)
void Sink (util::stream::Chains &chains, const std::vector< uint64_t > &counts)
void Source (util::stream::Chains &chains)
void Source (std::size_t order_minus_1, util::stream::Chain &chain)
std::size_t Order () const
const std::vector< uint64_t > & Counts () const
int VocabFile () const
int StealVocabFile ()
bool Keep () const


Detailed Description

Definition at line 21 of file model_buffer.hh.


Constructor & Destructor Documentation

lm::ModelBuffer::ModelBuffer ( StringPiece  file_base,
bool  keep_buffer,
bool  output_q 
)

Definition at line 17 of file model_buffer.cc.

lm::ModelBuffer::ModelBuffer ( StringPiece  file_base  )  [explicit]


Member Function Documentation

const std::vector<uint64_t>& lm::ModelBuffer::Counts (  )  const [inline]

Definition at line 41 of file model_buffer.hh.

bool lm::ModelBuffer::Keep (  )  const [inline]

Definition at line 49 of file model_buffer.hh.

Referenced by lm::builder::Output::SinkProbs().

Here is the caller graph for this function:

std::size_t lm::ModelBuffer::Order (  )  const [inline]

Definition at line 39 of file model_buffer.hh.

void lm::ModelBuffer::Sink ( util::stream::Chains chains,
const std::vector< uint64_t > &  counts 
)

Definition at line 55 of file model_buffer.cc.

References util::FixedArray< T >::back(), util::CreateOrThrow(), util::scoped_fd::get(), util::FixedArray< T >::Init(), util::MakeTemp(), util::FixedArray< T >::push_back(), and util::FixedArray< T >::size().

Referenced by lm::builder::Output::SinkProbs().

Here is the call graph for this function:

Here is the caller graph for this function:

void lm::ModelBuffer::Source ( std::size_t  order_minus_1,
util::stream::Chain chain 
)

Definition at line 87 of file model_buffer.cc.

void lm::ModelBuffer::Source ( util::stream::Chains chains  ) 

Definition at line 80 of file model_buffer.cc.

References util::FixedArray< T >::size().

Referenced by lm::builder::Output::SinkProbs().

Here is the call graph for this function:

Here is the caller graph for this function:

int lm::ModelBuffer::StealVocabFile (  )  [inline]

Definition at line 47 of file model_buffer.hh.

References util::scoped_fd::release().

Here is the call graph for this function:

int lm::ModelBuffer::VocabFile (  )  const [inline]

Definition at line 46 of file model_buffer.hh.

References util::scoped_fd::get().

Referenced by lm::builder::Output::VocabFile().

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:32:40 2017 for Moses by  doxygen 1.5.9