#include <model_buffer.hh>

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 |
Definition at line 21 of file model_buffer.hh.
| 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] |
Definition at line 21 of file model_buffer.cc.
References util::FixedArray< T >::Init(), util::OpenReadOrThrow(), util::FixedArray< T >::push_back(), util::scoped_fd::reset(), UTIL_THROW, and UTIL_THROW_IF2.

| 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().

| 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().


| 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().


| int lm::ModelBuffer::StealVocabFile | ( | ) | [inline] |
Definition at line 47 of file model_buffer.hh.
References util::scoped_fd::release().

| 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().


1.5.9