modelers/symbolweightvector.hpp File Reference
Detailed Description
Helper classes for working with probability/weight vectors.
- Remarks:
- These classes are basically just wrappers around vectors of numbers which represent the probability or occurrence count of symbols.
- A typical use for one of these classes is as the vector of symbol probabilities which is updated by the modeller and given to the coder in order to perform arithmetic coding.
- Alternatively it could be used as a vector of frequencies to be given to a huffman coder.
- This class implements the standard octane API, so can save/load state and report on memory usage.
- Author:
- mouser
- Date:
- 2003.07.29
- Todo:
- I considered making a base class and then derived template classes for integer and floating point weight vectors. however I'm not sure the memory advantage for integers (the rare case) would offset the speed hit to be paid for virtual functions, and the inconvenience of dealing with different types for different coders/modelers.
Definition in file symbolweightvector.hpp.
#include "../bitio/bitio.hpp"
#include "../core/octaneclass.hpp"
#include "../parsers/parser.hpp"
#include <assert.h>
Go to the source code of this file.
|
Compounds |
class | SymbolWeightVector |
| The SymbolWeightVector class is a helper class which holds a vector of probabilities, typically associated with a modeler. More...
|
Defines |
#define | TSymbolWeightVectorWeight float |
| what kind of precision should we use for the weights (freqs/probabilities)? we could use a typedef here, but that complicates things when we want to write/read with streams
|
Generated on 20 May 2004 by
doxygen 1.3.3