marytts.cart
Class LeafNode.IntAndFloatArrayLeafNode

java.lang.Object
  extended by marytts.cart.Node
      extended by marytts.cart.LeafNode
          extended by marytts.cart.LeafNode.IntArrayLeafNode
              extended by marytts.cart.LeafNode.IntAndFloatArrayLeafNode
Direct Known Subclasses:
LeafNode.StringAndFloatLeafNode
Enclosing class:
LeafNode

public static class LeafNode.IntAndFloatArrayLeafNode
extends LeafNode.IntArrayLeafNode


Nested Class Summary
 
Nested classes/interfaces inherited from class marytts.cart.LeafNode
LeafNode.FeatureVectorLeafNode, LeafNode.FloatLeafNode, LeafNode.IntAndFloatArrayLeafNode, LeafNode.IntArrayLeafNode, LeafNode.LeafType, LeafNode.PdfLeafNode, LeafNode.StringAndFloatLeafNode
 
Field Summary
protected  float[] floats
           
 
Fields inherited from class marytts.cart.LeafNode.IntArrayLeafNode
data
 
Fields inherited from class marytts.cart.LeafNode
uniqueLeafId
 
Fields inherited from class marytts.cart.Node
isRoot, mother, nodeIndex
 
Constructor Summary
LeafNode.IntAndFloatArrayLeafNode(int[] data, float[] floats)
           
 
Method Summary
 void eraseData(int target)
          Delete a candidate of the leaf by its given data/index
 float[] getFloatData()
           
 LeafNode.LeafType getLeafNodeType()
          The type of this leaf node.
 int mostProbableInt()
          For the int-float pairs in this leaf, return the int value for which the associated float value is the highest one.
 java.lang.String toString()
           
 
Methods inherited from class marytts.cart.LeafNode.IntArrayLeafNode
fillData, getAllData, getIntData, getNumberOfData, isEmpty
 
Methods inherited from class marytts.cart.LeafNode
getNumberOfNodes, getUniqueLeafId, isLeafNode, setUniqueLeafId
 
Methods inherited from class marytts.cart.Node
getDecisionPath, getMother, getNodeIndex, getRootNode, isDecisionNode, isDirectedGraphNode, isRoot, setIsRoot, setMother, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

floats

protected float[] floats
Constructor Detail

LeafNode.IntAndFloatArrayLeafNode

public LeafNode.IntAndFloatArrayLeafNode(int[] data,
                                         float[] floats)
Method Detail

getFloatData

public float[] getFloatData()

mostProbableInt

public int mostProbableInt()
For the int-float pairs in this leaf, return the int value for which the associated float value is the highest one. If the float values are probabilities, this method returns the most probable int.

Returns:

eraseData

public void eraseData(int target)
Delete a candidate of the leaf by its given data/index

Parameters:
target - the given data

getLeafNodeType

public LeafNode.LeafType getLeafNodeType()
Description copied from class: LeafNode
The type of this leaf node.

Overrides:
getLeafNodeType in class LeafNode.IntArrayLeafNode
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class LeafNode.IntArrayLeafNode