|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJxnMultivariateFunction
public class JxnMultivariateFunction
Wrapper used to pass a method definition to Commons Math algorithms.
Computes a command given as a String.
See JxnMultivariateFunction_Optimization~Demo.jxn
for an example.
Constructor Summary | |
---|---|
JxnMultivariateFunction(KmgFormelInterpreter fi,
java.lang.String cmd)
Constructs a MultivariateFunction
instance to be used by Commons Math algorithms. |
|
JxnMultivariateFunction(java.lang.String cmd,
KmgFormelInterpreter fi)
Deprecated. replaced by JxnMultivariateFunction(KmgFormelInterpreter, String) |
Method Summary | |
---|---|
java.lang.String |
toString()
Returns the command cmd passed to the constructor. |
double |
value(double[] x)
Internally called by Commons Math algorithms: Computes the function value using the given argument x . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JxnMultivariateFunction(KmgFormelInterpreter fi, java.lang.String cmd)
MultivariateFunction
instance to be used by Commons Math algorithms.mvf = @JxnMultivariateFunction( $this, "( $x[0]^2 + 2.5 $x[1]^2 - $x[1] ) * Math.exp( 1 - $x[0]^2 - $x[1]^2 );" )
fi
- an internal copy of fi
is used to execute cmd
cmd
- one or more statements separated by ';
'. The command cmd
must use the
array double[] $x
to compute a result of type double. If cmd
ends with ';
', log output of intermediate steps is suppressed.public JxnMultivariateFunction(java.lang.String cmd, KmgFormelInterpreter fi)
JxnMultivariateFunction(KmgFormelInterpreter, String)
Method Detail |
---|
public double value(double[] x)
x
.
value
in interface MultivariateFunction
public java.lang.String toString()
cmd
passed to the constructor.
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |