samplemodeler.hpp

来自「Octane v1.01.20 The Open Compression To」· HPP 代码 · 共 56 行

HPP
56
字号
/// @file samplemodeler.hpp
/// A sample modeler which basically assigns fixed equal probabilities to every symbol.
///
/// @author mouser
/// @date   2003.07.29
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
// recursive header protection
#ifndef SampleModelerH
#define SampleModelerH
//---------------------------------------------------------------------------

//---------------------------------------------------------------------------
// application includes
#include "../modeler_weightvectored.hpp"
// system includes
//---------------------------------------------------------------------------



//---------------------------------------------------------------------------
/// This is a sample modeler which simply ignores all 'training' information and
///  assigns equal probability to each symbol in the parser (sometimes called a -1 order model).
///
/// @ingroup Modelers
///
class SampleModeler : public OctaneModeler_WeightVectored
{
public:
	/// constructor
	SampleModeler() : OctaneModeler_WeightVectored() {;};
	/// destructor
	virtual ~SampleModeler() {;}
public:
	//---------------------------------------------------------------------------
	// OCTANE PUBLIC API - RTTI FUNCTIONS - these are supported by all derived classes
	virtual std::string GetName() {return "SampleModeler";}
	virtual std::string GetDescription() {return "Fixed Equal-Probability Modeler";}
	//---------------------------------------------------------------------------
public:
	//---------------------------------------------------------------------------
	// MODELLER PUBLIC API - ACCESSOR FOR CODING
	virtual bool CreateModelUsingStream(OctaneParser *parserp, bitreader &from) {return CreateModelUsingParser(parserp);};
	virtual bool CreateModelUsingParser(OctaneParser *parserp);
	//---------------------------------------------------------------------------
};
//---------------------------------------------------------------------------



//---------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?