#include <huffmanish.hh>
Public Member Functions | |
Huffman (const char *) | |
void | count_elements (line_text line) |
void | assign_values () |
void | serialize_maps (const char *dirname) |
void | produce_lookups () |
std::vector< unsigned int > | encode_line (line_text line) |
std::vector< unsigned char > | full_encode_line (line_text line) |
const std::map< unsigned int, std::string > | get_target_lookup_map () const |
const std::map< unsigned int, std::vector< unsigned char > > | get_word_all1_lookup_map () const |
unsigned long | getUniqLines () |
Definition at line 29 of file huffmanish.hh.
Huffman::Huffman | ( | const char * | filepath | ) |
Definition at line 3 of file huffmanish.cpp.
References count_elements(), num_lines, util::FilePiece::ReadLine(), line_text::source_phrase, and splitLine().
void Huffman::assign_values | ( | ) |
Definition at line 75 of file huffmanish.cpp.
References sort().
void Huffman::count_elements | ( | line_text | line | ) |
Definition at line 40 of file huffmanish.cpp.
References splitWordAll1(), line_text::target_phrase, and line_text::word_align.
Referenced by Huffman().
std::vector< unsigned int > Huffman::encode_line | ( | line_text | line | ) |
Definition at line 146 of file huffmanish.cpp.
References line_text::prob, reinterpret_float(), splitWordAll1(), line_text::target_phrase, and line_text::word_align.
Referenced by full_encode_line().
std::vector< unsigned char > Huffman::full_encode_line | ( | line_text | line | ) |
Definition at line 141 of file huffmanish.cpp.
References encode_line(), and vbyte_encode_line().
const std::map<unsigned int, std::string> Huffman::get_target_lookup_map | ( | ) | const [inline] |
Definition at line 62 of file huffmanish.hh.
const std::map<unsigned int, std::vector<unsigned char> > Huffman::get_word_all1_lookup_map | ( | ) | const [inline] |
Definition at line 65 of file huffmanish.hh.
unsigned long Huffman::getUniqLines | ( | ) | [inline] |
Definition at line 69 of file huffmanish.hh.
void Huffman::produce_lookups | ( | ) |
Definition at line 179 of file huffmanish.cpp.
void Huffman::serialize_maps | ( | const char * | dirname | ) |
Definition at line 120 of file huffmanish.cpp.