📄 xixibmdlg.h
字号:
// xixibmDlg.h : header file
//
#if !defined(AFX_XIXIBMDLG_H__05A8B68A_4B09_4B66_9227_18EB749BCF1E__INCLUDED_)
#define AFX_XIXIBMDLG_H__05A8B68A_4B09_4B66_9227_18EB749BCF1E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CXixibmDlg dialog
class Node //这个类用来描述二叉树每个接点的数据内容
{
public:
char symbol[2]; //二叉树节点的命名标识
Node *right; //二叉树节点左孩子的地址
Node *left; //二叉树节点右孩子的地址
};
class Sarray //这个类用来记录输入的数据
{
public:
char symbol[2]; //输入信号的标识
double prb; //该信号的发生概率
Node *addr; //这个信号在二叉树当中对应节点的地址
};
class Result //这个类用来保存二叉树遍历时信号(包括新建节点)的相关内容
{
public:
char symbol[2]; //该节点(信号)的标识
int length; //该节点(信号)Huffman编码的长度
char path[7]; //这个数组保存了该信号Huffman编码的码值
};
class CXixibmDlg : public CDialog
{
// Construction
public:
void hfmmc(); //哈夫曼码长
void dyhuffman(); //
void huffman();
void Traverse(Node *T,int step);
void feixiaolv();
void clear();
int js[7];
int hy[7];
void diaoyong();
inline double pd(double f);
int feinuobianma(int low,int high);
void bmxl();
double tbm[7];
void bianma();
void ljgl();
void machang();
void duishu();
void paixu();
double ay[8];
double by[7];
double dy[7];
CString ey[7]; //香农码字
CString gy[8]; //费诺码字
CString iy[7]; //哈夫曼码字
int cy[7];
int no[8];
CXixibmDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CXixibmDlg)
enum { IDD = IDD_XIXIBM_DIALOG };
double a1;
double a2;
double a3;
double a4;
double a5;
double a6;
double a7;
double b1;
double b2;
double b3;
double b4;
double b5;
double b6;
double b7;
double c1;
double c2;
double c3;
double c4;
double c5;
double c6;
double c7;
double d1;
double d2;
double d3;
double d4;
double d5;
double d6;
double d7;
CString e1;
CString e2;
CString e3;
CString e4;
CString e5;
CString e6;
double mc;
double xl;
CString e7;
CString i7;
CString i6;
CString i5;
CString i4;
CString i3;
CString i2;
CString i1;
int h7;
int h6;
int h5;
int h4;
int h3;
int h2;
int h1;
CString g7;
CString g6;
CString g5;
CString g4;
CString g3;
CString g2;
CString g1;
int m1;
int m2;
int m3;
int m4;
int m5;
int m6;
int m7;
double xys;
int f1;
int f2;
int f3;
int f4;
int f5;
int f6;
int f7;
double mcfn;
double mchfm;
double xlfn;
double xlhfm;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CXixibmDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CXixibmDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnDestroy();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void Onbianma();
afx_msg void Onclearall();
afx_msg void Onhelp();
virtual void OnOK();
afx_msg void Onaboutme();
afx_msg void Onfeipei();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_XIXIBMDLG_H__05A8B68A_4B09_4B66_9227_18EB749BCF1E__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -