Mathematics classes.
More...
Detailed Description
Mathematics classes.
Function Documentation
GReal_t gridripper::math::d2smoothH |
( |
GReal_t |
x, |
|
|
GReal_t |
delta | |
|
) |
| | |
Second derivative of smoothH.
- Parameters:
-
| x | the function argument |
| delta | half size of the smooth region |
- Returns:
- the second derivative; zero if abs(x) is greater or equal to delta
GReal_t gridripper::math::dsmoothH |
( |
GReal_t |
x, |
|
|
GReal_t |
delta | |
|
) |
| | |
Derivative of smoothH.
- Parameters:
-
| x | the function argument |
| delta | half size of the smooth region |
- Returns:
- the derivative; zero if abs(x) is greater or equal to delta
Lambert W function.
The inverse of f(w) = w*exp(w).
- Parameters:
-
- Returns:
- the value or NaN if x is smaller than -exp(-1)
GReal_t gridripper::math::smoothH |
( |
GReal_t |
x, |
|
|
GReal_t |
delta | |
|
) |
| | |
Analytic approximation of the Heaviside step function.
- Parameters:
-
| x | the function argument |
| delta | half size of the smooth region |
- Returns:
- the analytic interpolation if abs(x) is less than delta, zero if x is less than -delta, 1 if x is greater than +delta
int gridripper::math::solve_cubic_eq_real |
( |
GReal_t |
a0, |
|
|
GReal_t |
a1, |
|
|
GReal_t |
a2, |
|
|
GReal_t * |
x | |
|
) |
| | |
Solves the cubic equation a0 + a1*x + a2*x^2 + x^3 = 0.
- Parameters:
-
| a0 | the zeroth coefficient |
| a1 | the first coefficient (x^1) |
| a2 | the second coefficient (x^2) |
| x | output array for the real solution(s) |
- Returns:
- the number of real roots (1 or 3)