public DecisionTree decide ( State state ) { // Extract the value of the property being decided from state to be classified. OrdinalAttribute attributeValue = ( OrdinalAttribute ) state . getProperty ( propertyName ) ; // Extract the child decision tree that matches the property value, using the attributes ordinal for a quick // look up. return decisions [ attributeValue . ordinal ( ) ] ; }
Performs the actual decision based on a property of the state . If the quick lookup table has been initialized then the decision is taken straight from it . If not then the supplied reference to the decision tree at this point is used to find the outcome by scanning over its children .