public class ShiftedMathFunction extends java.lang.Object implements MathFunction, MathFunctionWithFirstDerivative, MathFunctionWithDerivative, MathFunctionWithIntegral
| Constructor and Description |
|---|
ShiftedMathFunction(MathFunction func,
double delta)
Constructs a new function shifting the function func by
a shift delta.
|
| Modifier and Type | Method and Description |
|---|---|
double |
derivative(double x)
Computes (or estimates) the first derivative
of the function at point x.
|
double |
derivative(double x,
int n)
Computes (or estimates) the nth derivative
of the function at point x.
|
double |
evaluate(double x)
Returns the value of the function evaluated at x.
|
double |
getDelta()
Returns the shift δ = delta.
|
MathFunction |
getFunction()
Returns the function f (x).
|
double |
integral(double a,
double b)
Computes (or estimates) the integral of the
function over the interval [a, b].
|
public ShiftedMathFunction(MathFunction func, double delta)
func - the function.delta - the shift.public MathFunction getFunction()
public double getDelta()
public double evaluate(double x)
MathFunctionevaluate in interface MathFunctionx - value at which the distribution function is evaluatedpublic double derivative(double x)
MathFunctionWithFirstDerivativederivative in interface MathFunctionWithFirstDerivativex - the point to evaluate the derivative to.public double derivative(double x,
int n)
MathFunctionWithDerivativeevaluate.derivative in interface MathFunctionWithDerivativex - the point to evaluate the derivate to.n - the order of the derivative.public double integral(double a,
double b)
MathFunctionWithIntegralintegral in interface MathFunctionWithIntegrala - the starting point of the interval.b - the ending point of the interval.To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.