|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.functions.Function net.sourceforge.cilib.functions.ContinuousFunction net.sourceforge.cilib.functions.continuous.ExpressionFunction
public class ExpressionFunction
A Function class that defines a function based on a predefined string which is parsed and interpreted during evaluation.
Constructor Summary | |
---|---|
ExpressionFunction()
Create a new instance of the ExpressionFunction. |
|
ExpressionFunction(ExpressionFunction copy)
Copy constructor. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
double |
evaluate(Vector x)
Evaluate the function with the given Vector as input. |
ExpressionFunction |
getClone()
Create a cloned copy of the current object and return it. |
String |
getExpression()
Get the defined function. |
int |
hashCode()
|
protected void |
initialiseParser()
|
void |
setExpression(String expression)
Set the parseable function. |
Methods inherited from class net.sourceforge.cilib.functions.ContinuousFunction |
---|
evaluate, getMaximum, getMinimum |
Methods inherited from class net.sourceforge.cilib.functions.Function |
---|
getBehavioralDomainRegistry, getDimension, getDomain, getDomainRegistry, setBehavioralDomain, setBehaviouralDomainRegistry, setDomain |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExpressionFunction()
public ExpressionFunction(ExpressionFunction copy)
copy
- The instance to copy.Method Detail |
---|
protected void initialiseParser()
public ExpressionFunction getClone()
getClone
in interface Cloneable
getClone
in class ContinuousFunction
Object.clone()
public double evaluate(Vector x)
Vector
as input.
evaluate
in class ContinuousFunction
x
- The input Vector
.
public String getExpression()
public void setExpression(String expression)
expression
- The string to parse and set as the function.public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |