📄 node.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 + -