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 ModuloFunction

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

All Implemented Interfaces:
  java.lang.Cloneable

    public class ModuloFunction

extends FunctionNode<java.lang.Double>

A `FunctionNode` which performs the modulo operation, that is it finds the remainder of division.

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

Method Summary
`java.lang.Double` | `evaluate()` Evaluating a `ModuloFunction` involves dividing the evaluated first child, by the second child with the result being the remainder.
`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

### ModuloFunction

    public ModuloFunction()

  Construct a ModuloFunction with no children.

### ModuloFunction

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

  Construct a ModuloFunction with two children. When evaluated, the modulo of the evaluated children will be calculated.

  Parameters:
    `child1` - The first child node - the dividend.
    `child2` - The second child node - the divisor.

Method Detail

### evaluate

    public java.lang.Double evaluate()

  Evaluating a `ModuloFunction` involves dividing the evaluated first child, by the second child with the result being the remainder.

  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 ModuloFunction which is MOD.

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