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. | |
| SquareMathFunction (MathFunction func, double a, double b) | |
| Constructs a new power function for function func, and constants a and b. | |
| MathFunction | getFunction () |
| Returns the function \(f(x)\). | |
| double | getA () |
| Returns the value of \(a\). | |
| double | getB () |
| Returns the value of \(b\). | |
| double | evaluate (double x) |
| Returns the value of the function evaluated at \(x\). | |
| double | derivative (double x) |
| Computes (or estimates) the first derivative of the function at point x. | |
Represents a function computing \((af(x) + b)^2\) for a user-defined function \(f(x)\).
Definition at line 33 of file SquareMathFunction.java.
| umontreal.ssj.functions.SquareMathFunction.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)\). |
Definition at line 43 of file SquareMathFunction.java.
| umontreal.ssj.functions.SquareMathFunction.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. |
Definition at line 55 of file SquareMathFunction.java.
| double umontreal.ssj.functions.SquareMathFunction.derivative | ( | double | x | ) |
Computes (or estimates) the first derivative of the function at point x.
| x | the point to evaluate the derivative to. |
Implements umontreal.ssj.functions.MathFunctionWithFirstDerivative.
Definition at line 95 of file SquareMathFunction.java.
| double umontreal.ssj.functions.SquareMathFunction.evaluate | ( | double | x | ) |
Returns the value of the function evaluated at \(x\).
| x | value at which the function is evaluated |
Implements umontreal.ssj.functions.MathFunction.
Definition at line 90 of file SquareMathFunction.java.
| double umontreal.ssj.functions.SquareMathFunction.getA | ( | ) |
Returns the value of \(a\).
Definition at line 77 of file SquareMathFunction.java.
| double umontreal.ssj.functions.SquareMathFunction.getB | ( | ) |
Returns the value of \(b\).
Definition at line 86 of file SquareMathFunction.java.
| MathFunction umontreal.ssj.functions.SquareMathFunction.getFunction | ( | ) |
Returns the function \(f(x)\).
Definition at line 68 of file SquareMathFunction.java.