Tree Compression with Top Trees Revisited
Public Member Functions | Public Attributes | List of all members
HuffmanBlocker< InputType, OutputType, inputSize, outputSize > Struct Template Reference

Constructs a blocked Huffman coding. More...

#include <Huffman.h>

Collaboration diagram for HuffmanBlocker< InputType, OutputType, inputSize, outputSize >:
Collaboration graph
[legend]

Public Member Functions

 HuffmanBlocker ()
 Initialise Huffman blocker. More...
 
void addItem (const InputType &symbol)
 add an occurence to the frequency statistics More...
 
template<class InputIterator >
void addItems (InputIterator begin, InputIterator end)
 add a sequence of occurences to the frequency statistics More...
 
void flushQueue ()
 Flush all remaining unwritten symbols. Call this after adding all items. More...
 

Public Attributes

const uint blockingFactor
 
std::vector< InputType > tempStore
 
HuffmanBuilder< OutputType > huffman
 

Detailed Description

template<typename InputType, typename OutputType, int inputSize = sizeof(InputType)*8, int outputSize = sizeof(OutputType)*8>
struct HuffmanBlocker< InputType, OutputType, inputSize, outputSize >

Constructs a blocked Huffman coding.

Constructs a blocked Huffman coding for the given input distribution.

The size of the output type must be a multiple of the input type's!

Definition at line 212 of file Huffman.h.

Constructor & Destructor Documentation

template<typename InputType, typename OutputType, int inputSize = sizeof(InputType)*8, int outputSize = sizeof(OutputType)*8>
HuffmanBlocker< InputType, OutputType, inputSize, outputSize >::HuffmanBlocker ( )
inline

Initialise Huffman blocker.

Definition at line 214 of file Huffman.h.

Member Function Documentation

template<typename InputType, typename OutputType, int inputSize = sizeof(InputType)*8, int outputSize = sizeof(OutputType)*8>
void HuffmanBlocker< InputType, OutputType, inputSize, outputSize >::addItem ( const InputType &  symbol)
inline

add an occurence to the frequency statistics

Definition at line 220 of file Huffman.h.

template<typename InputType, typename OutputType, int inputSize = sizeof(InputType)*8, int outputSize = sizeof(OutputType)*8>
template<class InputIterator >
void HuffmanBlocker< InputType, OutputType, inputSize, outputSize >::addItems ( InputIterator  begin,
InputIterator  end 
)
inline

add a sequence of occurences to the frequency statistics

Definition at line 229 of file Huffman.h.

template<typename InputType, typename OutputType, int inputSize = sizeof(InputType)*8, int outputSize = sizeof(OutputType)*8>
void HuffmanBlocker< InputType, OutputType, inputSize, outputSize >::flushQueue ( )
inline

Flush all remaining unwritten symbols. Call this after adding all items.

Definition at line 236 of file Huffman.h.

Member Data Documentation

template<typename InputType, typename OutputType, int inputSize = sizeof(InputType)*8, int outputSize = sizeof(OutputType)*8>
const uint HuffmanBlocker< InputType, OutputType, inputSize, outputSize >::blockingFactor

Definition at line 257 of file Huffman.h.

template<typename InputType, typename OutputType, int inputSize = sizeof(InputType)*8, int outputSize = sizeof(OutputType)*8>
HuffmanBuilder<OutputType> HuffmanBlocker< InputType, OutputType, inputSize, outputSize >::huffman

Definition at line 259 of file Huffman.h.

template<typename InputType, typename OutputType, int inputSize = sizeof(InputType)*8, int outputSize = sizeof(OutputType)*8>
std::vector<InputType> HuffmanBlocker< InputType, OutputType, inputSize, outputSize >::tempStore

Definition at line 258 of file Huffman.h.


The documentation for this struct was generated from the following file: