?? hufnode.cpp
字號:
// HufNode.cpp: implementation of the HufNode class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "HUF3.h"
#include "HufNode.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
HufNode::HufNode()
{
}
HufNode::~HufNode()
{
}
HufNode::HufNode(char c, double p)
{
name=c;
weight=p;
}
void HufNode::initnode()
{
parent=0;
lchild=0;
rchild=0;
weight=0;
name=NULL;
code=NULL;
}
char HufNode::GetName()
{
return name;
}
double HufNode::GetWeight()
{
return weight;
}
void HufNode::PutParent(int p)
{
parent=p;
}
void HufNode::PutLchild(int p)
{
lchild=p;
}
void HufNode::PutRchild(int p)
{
rchild=p;
}
void HufNode::PutWeight(double d)
{
weight=d;
}
int HufNode::GetParent()
{
return parent;
}
void HufNode::PutName(char c)
{
name=c;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -