📄 samplemodeler.hpp
字号:
/// @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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -