gpalta.nodes
Class LessThan

java.lang.Object
  extended by gpalta.nodes.Node
      extended by gpalta.nodes.LessThan
All Implemented Interfaces:
NodeParent, java.io.Serializable, java.lang.Cloneable

public class LessThan
extends Node

See Also:
Serialized Form

Constructor Summary
LessThan()
           
 
Method Summary
 double eval(ProblemData problemData)
          Evaluate the Node for a single sample.
 void evalVectInternal(double[] outVect, double[][] kidsOutput, ProblemData problemData)
          Internal method that evaluates the Node given its kids' outputs.
 java.lang.String name()
          Get the Node's short name (such as "plus", "minus", "x1", etc)
 int nKids()
          Read the number of kids of the Node
 
Methods inherited from class gpalta.nodes.Node
clone, deepClone, evalVect, getCurrentDepth, getKid, getMaxDepthFromHere, getNSubNodes, getParent, getType, getWhichKidOfParent, init, newKids, parse, setCurrentDepth, setKid, setMaxDepthFromHere, setNSubNodes, setParent, setType, setTypeOfKids, setWhichKidOfParent, toString, typeOfKids
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LessThan

public LessThan()
Method Detail

eval

public double eval(ProblemData problemData)
Description copied from class: Node
Evaluate the Node for a single sample. All Nodes must override this method. The Node is responsible for evaluating its children, if any.

Specified by:
eval in class Node
Returns:
The output of the Node

evalVectInternal

public void evalVectInternal(double[] outVect,
                             double[][] kidsOutput,
                             ProblemData problemData)
Description copied from class: Node
Internal method that evaluates the Node given its kids' outputs. All Nodes must override this method. Different to eval(), in this case, kids are already evaluated

Specified by:
evalVectInternal in class Node
Parameters:
outVect - The array where the outout must be stored
kidsOutput - Each array holds all the outputs for a kid
problemData - The problem's data

nKids

public int nKids()
Description copied from class: Node
Read the number of kids of the Node

Specified by:
nKids in interface NodeParent
Specified by:
nKids in class Node
Returns:
The number of kids this Node has

name

public java.lang.String name()
Description copied from class: Node
Get the Node's short name (such as "plus", "minus", "x1", etc)

Specified by:
name in class Node
Returns:
The Node's name