tree.cpp
来自「 关联规则fp算法」· C++ 代码 · 共 63 行
CPP
63 行
// Tree.cpp: implementation of the CTree class.
//
//////////////////////////////////////////////////////////////////////
#include "StdAfx.h"
#include "fp_tree.h"
#include "Tree.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CTree::CTree()
{
tree=new FPTNODE;
tree->count=0;
tree->item="";
tree->succ=NULL;
tree->parent=NULL;
tree->firstchild=NULL;
tree->next_sibling=NULL;
}
CTree::~CTree()
{
}
BOOL CTree::setNull()
{
FPTNODE *p;
if(tree->firstchild)
{
p=tree->firstchild;
tree->count=0;
tree->item="";
tree->succ=NULL;
tree->parent=NULL;
tree->firstchild=NULL;
tree->next_sibling=NULL;
delete p;
}
return TRUE;
}
BOOL CTree::isEmpty()
{
if(tree->firstchild)
return FALSE;
else
return TRUE;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?