public class SquareMathFunction extends java.lang.Object implements MathFunctionWithFirstDerivative
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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).
|
public SquareMathFunction(MathFunction func)
func - the function f (x).public SquareMathFunction(MathFunction func, double a, double b)
func - the function f (x).a - <
#30#>the multiplicative constant.b - the additive constant.public MathFunction getFunction()
public double getA()
public double getB()
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.To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.