public abstract class LeafNode extends Node
Modifier and Type | Class and Description |
---|---|
static class |
LeafNode.FeatureVectorLeafNode |
static class |
LeafNode.FloatLeafNode
A leaf class that is suitable for regression trees.
|
static class |
LeafNode.IntAndFloatArrayLeafNode |
static class |
LeafNode.IntArrayLeafNode
An LeafNode class suitable for representing the leaves of classification trees -- the leaf is a collection of items
identified by an index number.
|
static class |
LeafNode.LeafType |
static class |
LeafNode.PdfLeafNode
A leaf class that is suitable for regression trees.
|
static class |
LeafNode.StringAndFloatLeafNode |
Modifier and Type | Field and Description |
---|---|
protected int |
uniqueLeafId |
Constructor and Description |
---|
LeafNode()
Create a new LeafNode.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
fillData(Object target,
int pos,
int len)
Write this node's data into the target object at pos, making sure that exactly len data are written.
|
abstract Object |
getAllData()
Get all the data at or below this node.
|
abstract LeafNode.LeafType |
getLeafNodeType()
The type of this leaf node.
|
abstract int |
getNumberOfData()
Count all the data available at and below this node.
|
int |
getNumberOfNodes()
Count all the nodes at and below this node.
|
int |
getUniqueLeafId() |
abstract boolean |
isEmpty()
Indicate whether the leaf node has no meaningful data.
|
boolean |
isLeafNode() |
void |
setUniqueLeafId(int id) |
String |
toString() |
getDecisionPath, getMother, getNodeIndex, getRootNode, isDecisionNode, isDirectedGraphNode, isRoot, setIsRoot, setMother, toString
public boolean isLeafNode()
isLeafNode
in class Node
public int getNumberOfNodes()
getNumberOfNodes
in class Node
public void setUniqueLeafId(int id)
public int getUniqueLeafId()
public abstract boolean isEmpty()
public abstract int getNumberOfData()
getNumberOfData
in class Node
public abstract Object getAllData()
getAllData
in class Node
protected abstract void fillData(Object target, int pos, int len)
public abstract LeafNode.LeafType getLeafNodeType()
Copyright © 2000–2016 DFKI GmbH. All rights reserved.