?? model.h
字號:
// Model.h: interface for the CModel class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MODEL_H__FEA8F0E8_75C2_4404_A9A0_10F6F0B1701E__INCLUDED_)
#define AFX_MODEL_H__FEA8F0E8_75C2_4404_A9A0_10F6F0B1701E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// the set of symbols that may be encoded
#define nof_chars 256 // number of character symbols
#define EOF_symbol (nof_chars+1) // index of EOF symbol
#define nof_symbols (nof_chars+1) // total number of symbols
// max frequency count
#define max_frequency 16383
class CModel
{
public:
int freq[nof_symbols+1];
// translation tables between characters and symbol indexes
int char_to_index[nof_chars];
unsigned char index_to_char[nof_chars+1];
// cummulative frequency table
int cum_freq[nof_symbols+1];
public:
CModel();
~CModel();
void start();
void update(int symbol);
};
#endif // !defined(AFX_MODEL_H__FEA8F0E8_75C2_4404_A9A0_10F6F0B1701E__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -