public class PowerMathFunction extends java.lang.Object implements MathFunction, MathFunctionWithFirstDerivative
| Constructor and Description |
|---|
PowerMathFunction(MathFunction func,
double power)
Constructs a new power function for function func and power
power.
|
PowerMathFunction(MathFunction func,
double a,
double b,
double power)
Constructs a new power function for function func, power
power, 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).
|
double |
getPower()
Returns the power p.
|
public PowerMathFunction(MathFunction func, double power)
func - the function f (x).power - the power p.public PowerMathFunction(MathFunction func, double a, double b, double power)
func - the function f (x).power - the power p.a - the multiplicative constant.b - the additive constant.public MathFunction getFunction()
public double getA()
public double getB()
public double getPower()
public double derivative(double x)
MathFunctionWithFirstDerivativederivative in interface MathFunctionWithFirstDerivativex - the point to evaluate the derivative to.public double evaluate(double x)
MathFunctionevaluate in interface MathFunctionx - value at which the distribution function is evaluatedTo submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.