Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.epochx.representation.dbl
Class MinFunction

    java.lang.Object
      com.epochx.representation.Node<TYPE>
          com.epochx.representation.FunctionNode<java.lang.Double>
              com.epochx.representation.dbl.MinFunction

All Implemented Interfaces:
  java.lang.Cloneable

    public class MinFunction

extends FunctionNode<java.lang.Double>

A `MinFunction` which performs the simple comparison function of determining which of 2 numbers is smaller, as per the boolean less-than function.

Constructor Summary
`MinFunction()` Construct a MinFunction with no children.
`MinFunction(Node<java.lang.Double> child1, Node<java.lang.Double> child2)` Construct a MinFunction with two child.

Method Summary
`java.lang.Double` | `evaluate()` Evaluating a `MinFunction` involves evaluating the children then comparing and returning which ever is the smaller of the 2 evaluated children.
`java.lang.String` | `getFunctionName()` Get the unique name that identifies this function.

Methods inherited from class com.epochx.representation.FunctionNode
`equals, toString`

Methods inherited from class com.epochx.representation.Node
`clone, getArity, getChild, getChildren, getDepth, getFunctionNodes, getLength, getNodesAtDepth, getNoDistinctFunctions, getNoDistinctTerminals, getNoFunctions, getNoTerminals, getNthNode, getTerminalNodes, hashCode, setChild, setChildren, setNthNode`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MinFunction

    public MinFunction()

  Construct a MinFunction with no children.

### MinFunction

    public MinFunction(Node<java.lang.Double> child1,
                       Node<java.lang.Double> child2)

  Construct a MinFunction with two child. When evaluated, the children will both be evaluated with the smaller of the two returned as the result.

  Parameters:
    `child1` - The first child node for comparison.
    `child2` - The second child node for comparison.

Method Detail

### evaluate

    public java.lang.Double evaluate()

  Evaluating a `MinFunction` involves evaluating the children then comparing and returning which ever is the smaller of the 2 evaluated children.

  Specified by:
    `evaluate` in class `Node<java.lang.Double>`
  Returns:
    The result of evaluating the candidate program.

### getFunctionName

    public java.lang.String getFunctionName()

  Get the unique name that identifies this function.

  Specified by:
    `getFunctionName` in class `FunctionNode<java.lang.Double>`
  Returns:
    the unique name for the MinFunction which is MIN.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD