static class CARTImpl.ComparisonNode extends CARTImpl.DecisionNode
Modifier and Type | Field and Description |
---|---|
(package private) String |
comparisonType
The comparison type.
|
(package private) static String |
EQUALS
EQUALS
|
(package private) static String |
GREATER_THAN
GREATER_THAN
|
(package private) static String |
LESS_THAN
LESS_THAN
|
qfalse, qtrue
value
Constructor and Description |
---|
ComparisonNode(String feature,
Object value,
String comparisonType,
int qtrue,
int qfalse)
Create a new ComparisonNode with the given values.
|
Modifier and Type | Method and Description |
---|---|
int |
getNextNode(Object val)
Compare the given value and return the appropriate Node index.
|
String |
toString()
Get a string representation of this Node.
|
private String |
trace(Object value,
boolean match,
int next) |
findFeature, getFeature, getNextNode
dumpBinary, getValue, getValueString, setCreationLine
static final String LESS_THAN
static final String EQUALS
static final String GREATER_THAN
String comparisonType
public ComparisonNode(String feature, Object value, String comparisonType, int qtrue, int qfalse)
feature
- the string used to get a value from an Itemvalue
- the value to compare tocomparisonType
- one of LESS_THAN, EQUAL_TO, or GREATER_THANqtrue
- the Node index to go to if the comparison matchesqfalse
- the Node index to go to upon no matchpublic int getNextNode(Object val)
getNextNode
in class CARTImpl.DecisionNode
val
- the value to compareWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses