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.bool
Class NotFunction

    java.lang.Object
      com.epochx.representation.Node<TYPE>
          com.epochx.representation.FunctionNode<java.lang.Boolean>
              com.epochx.representation.bool.NotFunction

All Implemented Interfaces:
  java.lang.Cloneable

    public class NotFunction

extends FunctionNode<java.lang.Boolean>

A `FunctionNode` which performs logical negation.

Constructor Summary
`NotFunction()` Construct a NotFunction with no children.
`NotFunction(Node<java.lang.Boolean> child)` Construct a NotFunction with one children.

Method Summary
`java.lang.Boolean` | `evaluate()` Evaluating a `NotFunction` involves evaluating the child, then negating the result.
`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

### NotFunction

    public NotFunction()

  Construct a NotFunction with no children.

### NotFunction

    public NotFunction(Node<java.lang.Boolean> child)

  Construct a NotFunction with one children. When evaluated, if the child evaluates to true, the result will be false. If false, the result will be true.

  Parameters:
    `child` - The child node which will be evaluated and negated.

Method Detail

### evaluate

    public java.lang.Boolean evaluate()

  Evaluating a `NotFunction` involves evaluating the child, then negating the result. If the child evaluates to true, the result will be false, otherwise it will be true.

  Specified by:
    `evaluate` in class `Node<java.lang.Boolean>`
  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.Boolean>`
  Returns:
    the unique name for the NotFunction which is NOT.

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