|
||||||||||
| 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.FactorialFunction
public class FactorialFunction
A FunctionNode which performs the mathematical function of
factorial, which is normally expressed with an exclamation mark !
For example:
5! = 5 x 4 x 3 x 2 x 1 = FACTORIAL 5
| Constructor Summary | |
|---|---|
FactorialFunction()
Construct a FactorialFunction with no children. |
|
FactorialFunction(Node<java.lang.Double> child)
Construct a FactorialFunction with one child. |
|
| Method Summary | |
|---|---|
java.lang.Double |
evaluate()
Evaluating a FactorialFunction involves evaluating the child
first then performing factorial on 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 |
|---|
public FactorialFunction()
public FactorialFunction(Node<java.lang.Double> child)
child - The child which factorial will be performed on.| Method Detail |
|---|
public java.lang.Double evaluate()
FactorialFunction involves evaluating the child
first then performing factorial on the result. Factorial requires a natural
number, in order to achieve this the evaluated child may undergo rounding.
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 | |||||||||