TMB Documentation
v1.9.11
|
Special mathematical functions for which derivatives are implemented. More...
Functions | |
template<class Type > | |
Type | besselI (Type x, Type nu) |
besselI function (same as besselI from R). More... | |
template<class Type > | |
Type | besselJ (Type x, Type nu) |
besselJ function (same as besselJ from R). More... | |
template<class Type > | |
Type | besselK (Type x, Type nu) |
besselK function (same as besselK from R). More... | |
template<class Type > | |
Type | besselY (Type x, Type nu) |
besselY function (same as besselY from R). More... | |
template<class Type > | |
Type | lfactorial (Type x) |
Logarithm of factorial function (following R argument convention). | |
template<class Type > | |
Type | lgamma (Type x) |
Logarithm of gamma function (following R argument convention). | |
template<class Type > | |
Type | logspace_add (Type logx, Type logy) |
Addition in log-space. More... | |
template<class Type > | |
Type | logspace_sub (Type logx, Type logy) |
Subtraction in log-space. More... | |
template<class Type > | |
Type | matern (Type u, Type phi, Type kappa) |
Special mathematical functions for which derivatives are implemented.
Type besselI | ( | Type | x, |
Type | nu | ||
) |
besselI function (same as besselI from R).
Definition at line 488 of file distributions_R.hpp.
Type besselJ | ( | Type | x, |
Type | nu | ||
) |
besselJ function (same as besselJ from R).
Definition at line 511 of file distributions_R.hpp.
Type besselK | ( | Type | x, |
Type | nu | ||
) |
besselK function (same as besselK from R).
Definition at line 465 of file distributions_R.hpp.
Type besselY | ( | Type | x, |
Type | nu | ||
) |
besselY function (same as besselY from R).
Definition at line 526 of file distributions_R.hpp.
Type logspace_add | ( | Type | logx, |
Type | logy | ||
) |
Addition in log-space.
Calculates \(log( exp(logx) + exp(logy) )\) without causing unnecessary overflows or throwing away too much accuracy (see 'writing R-extensions'). The following reductions are applied while taping:
log(exp(logx) + exp(-INFINITY)) = logx
log(exp(-INFINITY) + exp(logy)) = logy
logx | The logarithm of x. |
logy | The logarithm of y. |
Definition at line 181 of file convenience.hpp.
Type logspace_sub | ( | Type | logx, |
Type | logy | ||
) |
Subtraction in log-space.
Calculates \(log( exp(logx) - exp(logy) )\) without causing unnecessary overflows or throwing away too much accuracy (see 'writing R-extensions').
logx | The logarithm of x. |
logy | The logarithm of y. |
Definition at line 205 of file convenience.hpp.
Type matern | ( | Type | u, |
Type | phi, | ||
Type | kappa | ||
) |
Matern correlation function
Compute values of the Matern correlation function for given distances and parameters. Same as 'matern' from the geoR package.
u | Distance. |
phi | Range parameter. |
kappa | Smoothness parameter. |
Definition at line 129 of file convenience.hpp.