Tree Compression with Top Trees Revisited
Public Member Functions | Public Attributes | List of all members
LabelDataEntropy< std::string > Struct Template Reference

Compute entropy of a set of label strings. More...

#include <Entropy.h>

Collaboration diagram for LabelDataEntropy< std::string >:
Collaboration graph
[legend]

Public Member Functions

 LabelDataEntropy (const Labels< std::string > &labels)
 
void construct ()
 Do entropy calculation. More...
 
void addToWriter (HuffmanWriter< std::string::value_type > &writer)
 Write the labels to a Huffman writer. More...
 
int getExtraSize () const
 

Public Attributes

const Labels< std::string > & labels
 
HuffmanBuilder< std::string::value_type > huffman
 

Detailed Description

template<>
struct LabelDataEntropy< std::string >

Compute entropy of a set of label strings.

Definition at line 111 of file Entropy.h.

Constructor & Destructor Documentation

LabelDataEntropy< std::string >::LabelDataEntropy ( const Labels< std::string > &  labels)
inline

Create entropy calculator

Parameters
labelsthe labels for which to calculate the entropy

Definition at line 114 of file Entropy.h.

Member Function Documentation

void LabelDataEntropy< std::string >::addToWriter ( HuffmanWriter< std::string::value_type > &  writer)
inline

Write the labels to a Huffman writer.

Definition at line 128 of file Entropy.h.

void LabelDataEntropy< std::string >::construct ( )
inline

Do entropy calculation.

Definition at line 117 of file Entropy.h.

int LabelDataEntropy< std::string >::getExtraSize ( ) const
inline

Additional amount of information that needs to be stored, in bits (e.g. for mapping code points to symbols)

Definition at line 139 of file Entropy.h.

Member Data Documentation

HuffmanBuilder<std::string::value_type> LabelDataEntropy< std::string >::huffman

Definition at line 144 of file Entropy.h.

const Labels<std::string>& LabelDataEntropy< std::string >::labels

Definition at line 143 of file Entropy.h.


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