Octane v1.01.20 - The Open Compression Toolkit for C++ | http://octane.sourceforge.net/ |
#include <modeler.hpp>
Inheritance diagram for OctaneModeler:
It's job is to continually maintain a probability distribution over the next symbol to be parsed. This probability information can be used by a coder (like an arithmetic or huffman coder) to optimally code the parsed symbol.
Definition at line 51 of file modeler.hpp.
Public Member Functions | |
OctaneModeler () | |
constructor | |
virtual | ~OctaneModeler () |
destructor | |
virtual std::string | GetName () |
provide a unique name for the coder, used in some cases to automatically register the object with a manager | |
virtual std::string | GetDescription () |
optionally provide a longer (maybe 20-60 characters) description | |
virtual std::string | GetHelpInformation () |
optionally provide more information about the object on request for help | |
virtual void | ResetState () |
virtual bool | IsReadyToModel () |
Are we ready to work? this is usually only true after the model has been trained. | |
virtual void | SynchronizeStateForNewStream () |
virtual bool | CreateModelUsingStream (OctaneParser *parserp, bitreader &from) |
Build a model using a stream and a parser. | |
virtual bool | CreateModelUsingParser (OctaneParser *parserp) |
Build a model just using parser. | |
virtual bool | PrepareForModeling (OctaneParser *parserp) |
Prepare for modeling mode given a trained parser. | |
virtual bool | UpdateModelAfterReceivingSymbol (int symbolnumber, OctaneCoder *coderp) |
Update our model after each symbol is received during compression and decompression. | |
virtual int | GetSymbolCount () |
Return the number of symbols in the modeler (should be same as number of symbols in the parser); called by coder. | |
virtual SymbolWeightVector * | GetWeightVectorp () |
Return a pointer to the current weight vector for symbols (used by coder) [optional] This is provided as a shortcut function to avoid having to make numerous calls to GetWeightVectorItem() below. | |
virtual TSymbolWeightVectorWeight | GetWeightVectorItem (int symbolnum) |
Return a specific weight index value; (used by coder). |
|
provide a unique name for the coder, used in some cases to automatically register the object with a manager
Reimplemented from OctaneClass. Reimplemented in SampleModeler, OctaneModeler_WeightVectored, and ZeroOrderModeler. Definition at line 61 of file modeler.hpp.
00061 {return "OctaneModeler";} |
|
optionally provide a longer (maybe 20-60 characters) description
Reimplemented from OctaneClass. Reimplemented in SampleModeler, OctaneModeler_WeightVectored, and ZeroOrderModeler. Definition at line 62 of file modeler.hpp.
00062 {return "Base Modeler";} |
|
optionally provide more information about the object on request for help
Reimplemented from OctaneClass. Definition at line 63 of file modeler.hpp. Referenced by OctaneCompressor_Statistical::GetHelpInformation().
00063 {return "";} |
|
Are we ready to work? this is usually only true after the model has been trained.
Reimplemented in OctaneModeler_WeightVectored. Definition at line 71 of file modeler.hpp. Referenced by OctaneCompressor_Statistical::IsReadyToCompress(), and OctaneCompressor_Statistical::SetupAnyDefaultParser().
00071 {return true;}; |
|
Build a model using a stream and a parser.
Reimplemented in SampleModeler, and ZeroOrderModeler. Definition at line 75 of file modeler.hpp. Referenced by OctaneCompressor_Statistical::DoProtectedCreateSymbolsAndModelsUsingStream().
00075 {return true;}; |
|
Build a model just using parser. This is called on startup, before any possible training, when a default parser exists.
Reimplemented in SampleModeler. Definition at line 80 of file modeler.hpp. Referenced by OctaneCompressor_Statistical::SetupAnyDefaultParser().
00080 {return false;}; |
|
Prepare for modeling mode given a trained parser.
Definition at line 83 of file modeler.hpp. Referenced by OctaneCompressor_Statistical::PrepareForCompression().
00083 {return true;}; |
|
Update our model after each symbol is received during compression and decompression. Modelers track symbols during parsing and update the probability distribution predictions for upcoming symbols. This function should notify the coder of changes to probabilities.
Definition at line 90 of file modeler.hpp. Referenced by OctaneCompressor_Statistical::DoProtectedCompress(), and OctaneCompressor_Statistical::DoProtectedDecompress().
00090 {return true;}; |
|
Return a pointer to the current weight vector for symbols (used by coder) [optional] This is provided as a shortcut function to avoid having to make numerous calls to GetWeightVectorItem() below. Not all modelers will maintain probabilities in the form of a SymbolWeightVector, and a modeler can return NULL in order to force the coder to get probabilities for each symbol individually.
Reimplemented in OctaneModeler_WeightVectored. Definition at line 103 of file modeler.hpp.
00103 {return NULL;};
|