📄 decisiontree.h
字号:
// DecisionTree.h: interface for the DecisionTree class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DECISIONTREE_H__FCC1D907_3482_4CD4_9FB8_4352829DF1B4__INCLUDED_)
#define AFX_DECISIONTREE_H__FCC1D907_3482_4CD4_9FB8_4352829DF1B4__INCLUDED_
#include "TreeNode.h" // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class DecisionTree
{
public:
void RemoveNode(TreeNode* node);
void OutputBinaryTree(string tag, TreeNode* currentNode);
void Output();
void AskQuestion(TreeNode* node);
void Query();
void QueryBinaryTree(TreeNode* rootNode);
bool SearchTreeAndAddNoNode(TreeNode* currentNode, int existingNodeID, int newNodeID, string newQorA);
void AddNoNode(int existingNodeID, int newNodeID, string newQorA);
bool SearchTreeAndAddYesNode(TreeNode* currentNode, int existingNodeID, int newNodeID, string newQorA);
void AddYesNode(int existingNodeID, int newNodeID, string newQorA);
void CreateRootNode(int nodeID, string newQorA);
//the key root node to which all other nodes are added.
TreeNode* m_pRootNode;
DecisionTree();
virtual ~DecisionTree();
};
#endif // !defined(AFX_DECISIONTREE_H__FCC1D907_3482_4CD4_9FB8_4352829DF1B4__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -