|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.functions.ShiftedMathFunction
public class ShiftedMathFunction
Represents a function computing f (x) - δ for a user-defined function f (x) and shift δ.
Constructor Summary | |
---|---|
ShiftedMathFunction(MathFunction func,
double delta)
Constructs a new function shifting the function func by a shift delta. |
Method Summary | |
---|---|
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]. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShiftedMathFunction(MathFunction func, double delta)
func
- the function.delta
- the shift.Method Detail |
---|
public MathFunction getFunction()
public double getDelta()
public double evaluate(double x)
MathFunction
evaluate
in interface MathFunction
x
- value at which the function is evaluated
public double derivative(double x)
MathFunctionWithFirstDerivative
derivative
in interface MathFunctionWithFirstDerivative
x
- the point to evaluate the derivative to.
public double derivative(double x, int n)
MathFunctionWithDerivative
evaluate
.
derivative
in interface MathFunctionWithDerivative
x
- the point to evaluate the derivate to.n
- the order of the derivative.
public double integral(double a, double b)
MathFunctionWithIntegral
integral
in interface MathFunctionWithIntegral
a
- the starting point of the interval.b
- the ending point of the interval.
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |