LodePNG::HuffmanTree Class Reference

List of all members.

Public Member Functions

int makeFromLengths (const std::vector< unsigned long > &bitlen, unsigned long maxbitlen)
void makeFromFrequencies (const std::vector< unsigned long > &frequencies, unsigned long maxbitlen)
bool decode (unsigned long &result, unsigned long bit) const
 HuffmanTree ()
unsigned long getCode (size_t index) const
unsigned long getLength (size_t index) const
unsigned long size () const

Public Attributes

int error

Private Member Functions

void make2DTree ()
void sort (Coin *data, size_t amount)
int makeFromLengths ()

Private Attributes

std::vector< unsigned long > tree2d
std::vector< unsigned long > tree1d
size_t treepos
std::vector< unsigned long > lengths
unsigned long maxbitlen
unsigned long numcodes

Classes

struct  Coin


Constructor & Destructor Documentation

LodePNG::HuffmanTree::HuffmanTree (  )  [inline]


Member Function Documentation

int LodePNG::HuffmanTree::makeFromLengths ( const std::vector< unsigned long > &  bitlen,
unsigned long  maxbitlen 
) [inline]

Here is the call graph for this function:

void LodePNG::HuffmanTree::makeFromFrequencies ( const std::vector< unsigned long > &  frequencies,
unsigned long  maxbitlen 
) [inline]

Here is the call graph for this function:

bool LodePNG::HuffmanTree::decode ( unsigned long &  result,
unsigned long  bit 
) const [inline]

unsigned long LodePNG::HuffmanTree::getCode ( size_t  index  )  const [inline]

unsigned long LodePNG::HuffmanTree::getLength ( size_t  index  )  const [inline]

unsigned long LodePNG::HuffmanTree::size (  )  const [inline]

void LodePNG::HuffmanTree::make2DTree (  )  [inline, private]

void LodePNG::HuffmanTree::sort ( Coin data,
size_t  amount 
) [inline, private]

int LodePNG::HuffmanTree::makeFromLengths (  )  [inline, private]

Here is the call graph for this function:


Member Data Documentation

std::vector<unsigned long> LodePNG::HuffmanTree::tree2d [private]

std::vector<unsigned long> LodePNG::HuffmanTree::tree1d [private]

size_t LodePNG::HuffmanTree::treepos [mutable, private]

std::vector<unsigned long> LodePNG::HuffmanTree::lengths [private]

unsigned long LodePNG::HuffmanTree::maxbitlen [private]

unsigned long LodePNG::HuffmanTree::numcodes [private]


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

Generated on Thu Mar 19 19:36:27 2009 for CubicVR by  doxygen 1.5.6