25package umontreal.ssj.functions;
57 throw new NullPointerException();
91 final double v = a * func.evaluate(x) + b;
97 return 2 * a * (a * func.evaluate(x) + b) * fder;
Provides utility methods for computing derivatives and integrals of functions.
static double derivative(MathFunction func, double x)
Returns the first derivative of the function func evaluated at x.
double getA()
Returns the value of .
SquareMathFunction(MathFunction func)
Constructs a new square function for function func.
MathFunction getFunction()
Returns the function .
double evaluate(double x)
Returns the value of the function evaluated at .
double getB()
Returns the value of .
SquareMathFunction(MathFunction func, double a, double b)
Constructs a new power function for function func, and constants a and b.
double derivative(double x)
Computes (or estimates) the first derivative of the function at point x.
Represents a mathematical function whose derivative can be computed using derivative(double).
This interface should be implemented by classes which represent univariate mathematical functions.