Class JxnUnivariateFunction
- java.lang.Object
-
- JxnUnivariateFunction
-
- All Implemented Interfaces:
UnivariateFunction
public class JxnUnivariateFunction extends Object implements UnivariateFunction
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
Constructors Constructor Description JxnUnivariateFunction(String cmd, KmgFormelInterpreter fi)Deprecated.JxnUnivariateFunction(KmgFormelInterpreter fi, String cmd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoString()Returns the commandcmdpassed to the constructor.doublevalue(double x)Internally called by Commons Math algorithms: Computes the function value using the given argumentx.
-
-
-
Constructor Detail
-
JxnUnivariateFunction
public JxnUnivariateFunction(KmgFormelInterpreter fi, String cmd)
Constructs anUnivariateFunctioninstance to be used by Commons Math algorithms.
Example:uvf = @JxnUnivariateFunction( $this, "Math.sin $x;" )- Parameters:
fi- an internal copy offiis used to executecmdcmd- one or more statements separated by ';'. The commandcmdmust use the variable double$xto compute a result of type double. Ifcmdends with ';', log output of intermediate steps is suppressed.
-
JxnUnivariateFunction
public JxnUnivariateFunction(String cmd, KmgFormelInterpreter fi)
Deprecated.
-
-
Method Detail
-
value
public double value(double x)
Internally called by Commons Math algorithms: Computes the function value using the given argumentx.- Specified by:
valuein interfaceUnivariateFunction
-
-