| edu.hws.jcm.data.Function
All known Subclasses: edu.hws.jcm.functions.FunctionParserExtension, edu.hws.jcm.data.SimpleFunction,
Function | abstract public interface Function extends java.io.Serializable(Code) | | A Function is a mathematical real-valued function of zero or more
real-valued arguments. The number of arguments is called the arity
of the function.
|
Method Summary | |
public boolean | dependsOn(Variable x) Return true if the defintion of this function depends
in some way on the variable x. | public Function | derivative(int wrt) Return the derivative of the function with repect to
argument number wrt. | public Function | derivative(Variable x) Return the derivative of the function with respect to the
variable x. | public int | getArity() Return the number of arguments of this function. | public double | getVal(double[] arguments) Find the value of the function at the argument values
given by arguments[0], arguments[1], ... | public double | getValueWithCases(double[] arguments, Cases cases) Find the value of the function at the argument values
given by arguments[0], arguments[1], ... |
dependsOn | public boolean dependsOn(Variable x)(Code) | | Return true if the defintion of this function depends
in some way on the variable x. If not, it's assumed
that the derivative w.r.t. x of the function, applied to any
arguments that do not themselves depend on x, is zero.
(This routine is required for the general function-differentiating
code in the class FunctionParserExtension.)
|
derivative | public Function derivative(int wrt)(Code) | | Return the derivative of the function with repect to
argument number wrt. For example, derivative(1) returns
the derivative function with respedt to the first argument.
Note that argements are numbered starting from 1.
|
derivative | public Function derivative(Variable x)(Code) | | Return the derivative of the function with respect to the
variable x. This will be non-zero only if x occurs somehow in
the definition of x: For example, f(y) = sin(x*y);
(This routine is required for the general function-differentiating
code in the class FunctionParserExtension.)
|
getArity | public int getArity()(Code) | | Return the number of arguments of this function. This must
be a non-negative integer.
|
getVal | public double getVal(double[] arguments)(Code) | | Find the value of the function at the argument values
given by arguments[0], arguments[1], ... The length
of the array, arguments, should be equal to the arity of
the function.
|
getValueWithCases | public double getValueWithCases(double[] arguments, Cases cases)(Code) | | Find the value of the function at the argument values
given by arguments[0], arguments[1], ... The length
of the array argument should be equal to the arity of
the function. Information about "cases" is stored in
the Cases parameter, if it is non-null. See the Cases
class for more information.
|
|
|