SSJ
3.3.1
Stochastic Simulation in Java
|
Represents a function computing \((af(x) + b)^2\) for a user-defined function \(f(x)\). More...
Public Member Functions | |
SquareMathFunction (MathFunction func) | |
Constructs a new square function for function func . More... | |
SquareMathFunction (MathFunction func, double a, double b) | |
Constructs a new power function for function func , and constants a and b . More... | |
MathFunction | getFunction () |
Returns the function \(f(x)\). More... | |
double | getA () |
Returns the value of \(a\). More... | |
double | getB () |
Returns the value of \(b\). More... | |
double | evaluate (double x) |
Returns the value of the function evaluated at \(x\). More... | |
double | derivative (double x) |
Computes (or estimates) the first derivative of the function at point x . More... | |
Package Attributes | |
double | b |
Represents a function computing \((af(x) + b)^2\) for a user-defined function \(f(x)\).
SquareMathFunction | ( | MathFunction | func | ) |
Constructs a new square function for function func
.
The values of the constants are \(a=1\) and \(b=0\).
func | the function \(f(x)\). |
SquareMathFunction | ( | MathFunction | func, |
double | a, | ||
double | b | ||
) |
Constructs a new power function for function func
, and constants a
and b
.
func | the function \(f(x)\). |
a | the multiplicative constant. |
b | the additive constant. |
double derivative | ( | double | x | ) |
Computes (or estimates) the first derivative of the function at point x
.
x | the point to evaluate the derivative to. |
Implements MathFunctionWithFirstDerivative.
double evaluate | ( | double | x | ) |
Returns the value of the function evaluated at \(x\).
x | value at which the function is evaluated |
x
Implements MathFunction.
double getA | ( | ) |
Returns the value of \(a\).
double getB | ( | ) |
Returns the value of \(b\).
MathFunction getFunction | ( | ) |
Returns the function \(f(x)\).