Skip to content

Commit 511effd

Browse files
author
linyiqun
committed
KD树节点类
KD树节点类
1 parent a3c5fa4 commit 511effd

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package DataMining_KDTree;
2+
3+
/**
4+
* KD树节点
5+
* @author lyq
6+
*
7+
*/
8+
public class TreeNode {
9+
//数据矢量
10+
Point nodeData;
11+
//分割平面的分割线
12+
int spilt;
13+
//空间矢量,该节点所表示的空间范围
14+
Range range;
15+
//父节点
16+
TreeNode parentNode;
17+
//位于分割超平面左侧的孩子节点
18+
TreeNode leftNode;
19+
//位于分割超平面右侧的孩子节点
20+
TreeNode rightNode;
21+
//节点是否被访问过,用于回溯时使用
22+
boolean isVisited;
23+
24+
public TreeNode(){
25+
this.isVisited = false;
26+
}
27+
}

0 commit comments

Comments
 (0)