marytts.cart
Class DecisionNode.BinaryByteDecisionNode

java.lang.Object
  extended by marytts.cart.Node
      extended by marytts.cart.DecisionNode
          extended by marytts.cart.DecisionNode.BinaryByteDecisionNode
Enclosing class:
DecisionNode

public static class DecisionNode.BinaryByteDecisionNode
extends DecisionNode

A binary decision Node that compares two byte values.


Nested Class Summary
 
Nested classes/interfaces inherited from class marytts.cart.DecisionNode
DecisionNode.BinaryByteDecisionNode, DecisionNode.BinaryFloatDecisionNode, DecisionNode.BinaryShortDecisionNode, DecisionNode.ByteDecisionNode, DecisionNode.ShortDecisionNode, DecisionNode.Type
 
Field Summary
 
Fields inherited from class marytts.cart.DecisionNode
daughters, feature, featureDefinition, featureIndex, lastDaughter, nData, TRACE, uniqueDecisionNodeId
 
Fields inherited from class marytts.cart.Node
isRoot, mother, nodeIndex
 
Constructor Summary
DecisionNode.BinaryByteDecisionNode(int featureIndex, byte value, FeatureDefinition featureDefinition)
           
DecisionNode.BinaryByteDecisionNode(int uniqueId, FeatureDefinition featureDefinition)
          Creates an empty BinaryByteDecisionNode, the feature and feature value of this node should be filled with setFeatureAndFeatureValue() function.
DecisionNode.BinaryByteDecisionNode(java.lang.String feature, java.lang.String value, FeatureDefinition featureDefinition)
          Create a new binary String DecisionNode.
 
Method Summary
 byte getCriterionValueAsByte()
           
 java.lang.String getCriterionValueAsString()
           
 DecisionNode.Type getDecisionNodeType()
          Get the decision node type
 java.lang.String getDecisionPath(int daughterIndex)
          Get the path leading to the daughter with the given index.
 Node getNextNode(FeatureVector featureVector)
          Select a daughter node according to the value in the given target
 java.lang.String getNodeDefinition()
          Gets the String that defines the decision done in the node
 void setFeatureAndFeatureValue(java.lang.String feature, java.lang.String value)
          Fill the feature and feature value of an already created (empty) BinaryByteDecisionNode.
 
Methods inherited from class marytts.cart.DecisionNode
addDaughter, countData, fillData, getAllData, getDaughter, getFeatureDefinition, getFeatureIndex, getFeatureName, getNumberOfData, getNumberOfDaugthers, getNumberOfNodes, getUniqueDecisionNodeId, hasMoreDaughters, isDecisionNode, replaceDaughter, setUniqueDecisionNodeId, toString
 
Methods inherited from class marytts.cart.Node
getDecisionPath, getMother, getNodeIndex, getRootNode, isDirectedGraphNode, isLeafNode, isRoot, setIsRoot, setMother, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DecisionNode.BinaryByteDecisionNode

public DecisionNode.BinaryByteDecisionNode(java.lang.String feature,
                                           java.lang.String value,
                                           FeatureDefinition featureDefinition)
Create a new binary String DecisionNode.

Parameters:
feature - the string used to get a value from an Item
value - the value to compare to

DecisionNode.BinaryByteDecisionNode

public DecisionNode.BinaryByteDecisionNode(int featureIndex,
                                           byte value,
                                           FeatureDefinition featureDefinition)

DecisionNode.BinaryByteDecisionNode

public DecisionNode.BinaryByteDecisionNode(int uniqueId,
                                           FeatureDefinition featureDefinition)
Creates an empty BinaryByteDecisionNode, the feature and feature value of this node should be filled with setFeatureAndFeatureValue() function.

Parameters:
uniqueId - unique index from tree HTS test file.
featureDefinition -
Method Detail

setFeatureAndFeatureValue

public void setFeatureAndFeatureValue(java.lang.String feature,
                                      java.lang.String value)
Fill the feature and feature value of an already created (empty) BinaryByteDecisionNode.

Parameters:
feature -
value -

getCriterionValueAsByte

public byte getCriterionValueAsByte()

getCriterionValueAsString

public java.lang.String getCriterionValueAsString()

getNextNode

public Node getNextNode(FeatureVector featureVector)
Select a daughter node according to the value in the given target

Specified by:
getNextNode in class DecisionNode
Parameters:
target - the target
Returns:
a daughter

getDecisionPath

public java.lang.String getDecisionPath(int daughterIndex)
Description copied from class: DecisionNode
Get the path leading to the daughter with the given index. This will recursively go up to the root node.

Specified by:
getDecisionPath in class DecisionNode
Returns:

getNodeDefinition

public java.lang.String getNodeDefinition()
Gets the String that defines the decision done in the node

Specified by:
getNodeDefinition in class DecisionNode
Returns:
the node definition

getDecisionNodeType

public DecisionNode.Type getDecisionNodeType()
Description copied from class: DecisionNode
Get the decision node type

Specified by:
getDecisionNodeType in class DecisionNode
Returns: