|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJxnUnivariateFunction
public class JxnUnivariateFunction
Wrapper used to pass a method definition to Commons Math algorithms.
Computes a command given as a String.
See JxnUnivariateFunction_SolverOptimizer~Demo.jxn
for examples.
Constructor Summary | |
---|---|
JxnUnivariateFunction(KmgFormelInterpreter fi,
java.lang.String cmd)
Constructs an UnivariateFunction
instance to be used by Commons Math algorithms. |
|
JxnUnivariateFunction(java.lang.String cmd,
KmgFormelInterpreter fi)
Deprecated. replaced by JxnUnivariateFunction(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 JxnUnivariateFunction(KmgFormelInterpreter fi, java.lang.String cmd)
UnivariateFunction
instance to be used by Commons Math algorithms.uvf = @JxnUnivariateFunction( $this, "Math.sin $x;" )
fi
- an internal copy of fi
is used to execute cmd
cmd
- one or more statements separated by ';
'. The command cmd
must use the
variable double $x
to compute a result of type double. If cmd
ends with ';
', log output of intermediate steps is suppressed.public JxnUnivariateFunction(java.lang.String cmd, KmgFormelInterpreter fi)
JxnUnivariateFunction(KmgFormelInterpreter, String)
Method Detail |
---|
public double value(double x)
x
.
value
in interface UnivariateFunction
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 |