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 NandFunction

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

All Implemented Interfaces:
  java.lang.Cloneable

    public class NandFunction

extends FunctionNode<java.lang.Boolean>

A `FunctionNode` which performs the logical operation of NAND that is equivalent to the negation of the conjunction or NOT AND.

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

Method Summary
`java.lang.Boolean` | `evaluate()` Evaluating a `NandFunction` involves combining the evaluation of the children according to the rules of NAND where if both children evaluate to true then the result will be false.
`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

### NandFunction

    public NandFunction()

  Construct a NandFunction with no children.

### NandFunction

    public NandFunction(Node<java.lang.Boolean> child1,
                        Node<java.lang.Boolean> child2)

  Construct a NandFunction with two children. When evaluated, if both children evaluate to true then the result will be false. All other combinations will return a result of true.

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

Method Detail

### evaluate

    public java.lang.Boolean evaluate()

  Evaluating a `NandFunction` involves combining the evaluation of the children according to the rules of NAND where if both children evaluate to true then the result will be false. All other combinations will return a result of 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 NandFunction which is NAND.

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