⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tree.cpp

📁  关联规则fp算法
💻 CPP
字号:
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -