|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.epochx.representation.Node<TYPE>
com.epochx.representation.FunctionNode<java.lang.Double>
com.epochx.representation.dbl.InvertFunction
public class InvertFunction
A FunctionNode which performs the multiplicative inverse (or
reciprocal), that is the inverse of x is 1/x.
| Constructor Summary | |
|---|---|
InvertFunction()
Construct an InvertFunction with no children. |
|
InvertFunction(Node<java.lang.Double> child)
Construct an InvertFunction with one child. |
|
| Method Summary | |
|---|---|
java.lang.Double |
evaluate()
Evaluating an InvertFunction involves calculating the
result of 1 divided by the result of evaluating the child. |
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 |
|---|
public InvertFunction()
public InvertFunction(Node<java.lang.Double> child)
child - The child which the reciprocal will be found for.| Method Detail |
|---|
public java.lang.Double evaluate()
InvertFunction involves calculating the
result of 1 divided by the result of evaluating the child. The
exception to this is where the child evaluates to 0.0. In this case
there is no finite reciprocal and the result will be 1.0.
evaluate in class Node<java.lang.Double>public java.lang.String getFunctionName()
getFunctionName in class FunctionNode<java.lang.Double>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||