|
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.SquareMathFunction
public class SquareMathFunction
Represents a function computing (af (x) + b)2 for a user-defined function f (x).
Constructor Summary | |
---|---|
SquareMathFunction(MathFunction func)
Constructs a new square function for function func. |
|
SquareMathFunction(MathFunction func,
double a,
double b)
Constructs a new power function for function func, and constants a and b. |
Method Summary | |
---|---|
double |
derivative(double x)
Computes (or estimates) the first derivative of the function at point x. |
double |
evaluate(double x)
Returns the value of the function evaluated at x. |
double |
getA()
Returns the value of a. |
double |
getB()
Returns the value of b. |
MathFunction |
getFunction()
Returns the function f (x). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SquareMathFunction(MathFunction func)
func
- the function f (x).public SquareMathFunction(MathFunction func, double a, double b)
func
- the function f (x).a
- the multiplicative constant.b
- the additive constant.Method Detail |
---|
public MathFunction getFunction()
public double getA()
public double getB()
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.
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |