-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDTreeNode.java
41 lines (33 loc) · 848 Bytes
/
DTreeNode.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import java.util.*;
public class DTreeNode {
private String attributeName;
private int attributeIndex;
private int label;
private int defaultLabel;
private Map<Integer, DTreeNode> branches;
public DTreeNode(String attributeName, int attributeIndex, int defaultLabel, Map<Integer, DTreeNode> branches) {
this.attributeName = attributeName;
this.attributeIndex = attributeIndex;
this.defaultLabel = defaultLabel;
this.branches = branches;
}
public DTreeNode(int label) {
this.label = label;
this.branches = null;
}
public String getName() {
return this.attributeName;
}
public int getIndex() {
return this.attributeIndex;
}
public int getLabel() {
return this.label;
}
public int getDefaultLabel() {
return this.defaultLabel;
}
public Map<Integer, DTreeNode> getBranches() {
return this.branches;
}
}