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

📄 node.cpp

📁 c4.5决策树的实现,应用于一个医学诊断
💻 CPP
字号:
#include "Stdafx.h"
#include "Node.h"

Node:: Node()
{
    value = -1;
	attribute = -1;
	isLeaf = 0;
	depth=-1;
	leftchild = NULL;
	rightchild =NULL;
}

Node:: Node(double value,int attribute,int isLeaf = 0)
{
	this->value = value;
	this->index = index;
	this->isLeaf = isLeaf;
	leftchild = rightchild =0;
}
	
void Node:: SetValue(double value)
{
	this->value = value;
}
	
double Node:: GetValue()
{
	return this->value;
}
	
void Node:: SetAttribute(int attribute)
{
	this->attribute = attibute;
}

int Node:: GetAttribute()
{
	return this->attribute;
}
	
void Node:: SetLeaf(bool isLeaf)
{
	this->isLeaf = isLeaf;
}
	
int Node:: IsLeaf()
{
	return this->isLeaf;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -