|
||||||||||
| 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.CoefficientPowerFunction
public class CoefficientPowerFunction
The CoefficientPowerFunction is equivalent to a PowerFunction
combined with a MultiplyFunction. It allows a succinct way of
representing a variable with an exponent and a coefficient.
An example:
3x^2, which is equivalent to 3*(x^2)
CVP 3 x 2, which is equivalent to MUL(POW x 2)
| Constructor Summary | |
|---|---|
CoefficientPowerFunction()
Construct an CoefficientPowerFunction with no children. |
|
CoefficientPowerFunction(Node<java.lang.Double> coefficient,
Node<java.lang.Double> term,
Node<java.lang.Double> exponent)
Construct a CoefficientPowerFunction with three children. |
|
| Method Summary | |
|---|---|
java.lang.Double |
evaluate()
Evaluating a CoefficientPowerFunction is performed by
evaluating the children and then calculating the result of the second
child raised to the power of the third, then multiplied by the first
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 CoefficientPowerFunction()
public CoefficientPowerFunction(Node<java.lang.Double> coefficient,
Node<java.lang.Double> term,
Node<java.lang.Double> exponent)
coefficient - will be multiplied by the result of the term raised to
the exponent.term - will be raised to the power of the exponent and multiplied by
the coefficient.exponent - the power the term will be raised to.| Method Detail |
|---|
public java.lang.Double evaluate()
CoefficientPowerFunction is performed by
evaluating the children and then calculating the result of the second
child raised to the power of the third, then multiplied by the first
child.
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 | |||||||||