A namespace for various mathematical functions. More...
Functions | |
scalar | erfInv (const scalar y) |
Inverse error function of a real-number argument. More... | |
scalar | invIncGamma (const scalar a, const scalar P) |
Inverse of regularised lower incomplete gamma function. More... | |
scalar | incGammaRatio_Q (const scalar a, const scalar x) |
Regularised upper incomplete gamma function. More... | |
scalar | incGammaRatio_P (const scalar a, const scalar x) |
Regularised lower incomplete gamma function. More... | |
scalar | incGamma_Q (const scalar a, const scalar x) |
Upper incomplete gamma function. More... | |
scalar | incGamma_P (const scalar a, const scalar x) |
Lower incomplete gamma function. More... | |
A namespace for various mathematical functions.
Reference:
Inverse error function (tag:W): Winitzki, S. (2008). A handy approximation for the error function and its inverse. A lecture note obtained through private communication. URL:https://sites.google.com/site/winitzki/sergei-winitzkis-files (Retrieved on: 16 Feb 2021). Incomplete gamma functions (tag:DM): DiDonato, A. R., & Morris Jr, A. H. (1986). Computation of the incomplete gamma function ratios and their inverse. ACM Transactions on Mathematical Software (TOMS), 12(4), 377-393. DOI:10.1145/22721.23109
invIncGamma
is described in (DM:Sec. 4).incGammaRatio_Q
is described in (DM:Sec. 3).IND
is set to a value of 1.Foam::scalar erfInv | ( | const scalar | y | ) |
Inverse error function of a real-number argument.
y | Real-number argument at which to evaluate. Domain: (-1, 1) |
Definition at line 36 of file erfInv.C.
References Foam::endl(), h, k, Foam::log(), Foam::mag(), Foam::nl, Foam::sqr(), Foam::sqrt(), WarningInFunction, x, and y.
Referenced by normal::sample(), and multiNormal::sample().
Foam::scalar invIncGamma | ( | const scalar | a, |
const scalar | P | ||
) |
Inverse of regularised lower incomplete gamma function.
a | Real-number argument. Domain: (0, infty] |
P | Real-number argument. Domain: [0,1] |
Definition at line 93 of file invIncGamma.C.
References B, D, e, Foam::endl(), Foam::constant::mathematical::Eu(), Foam::exp(), Foam::lgamma(), Foam::log(), Foam::mag(), max(), Foam::minimaxs(), Foam::pow(), s(), Foam::Sn(), Foam::sqr(), Foam::sqrt(), WarningInFunction, and y.
Referenced by massRosinRammler::sample().
Foam::scalar incGammaRatio_Q | ( | const scalar | a, |
const scalar | x | ||
) |
Regularised upper incomplete gamma function.
a | Real-number argument. Domain: (0, infty] |
x | Real-number argument. Domain: [0, infty] |
Definition at line 200 of file incGamma.C.
References alpha, Foam::calcPE15(), Foam::calcQE11(), Foam::calcQE16(), Foam::calcTE18(), Foam::endl(), Foam::erf(), Foam::erfc(), Foam::exp(), Foam::factorial(), H(), L, lambda(), Foam::log(), max(), n, phi, Foam::pow(), R, Foam::sqrt(), Foam::sum(), WarningInFunction, x, and y.
Referenced by incGamma_Q(), incGammaRatio_P(), and LuoSvendsen::LuoSvendsen().
Foam::scalar incGammaRatio_P | ( | const scalar | a, |
const scalar | x | ||
) |
Regularised lower incomplete gamma function.
a | Real-number argument. Domain: (0, infty] |
x | Real-number argument. Domain: [0, infty] |
Definition at line 438 of file incGamma.C.
References incGammaRatio_Q(), and x.
Referenced by incGamma_P().
Foam::scalar incGamma_Q | ( | const scalar | a, |
const scalar | x | ||
) |
Upper incomplete gamma function.
a | Real-number argument. Domain: (0, infty] |
x | Real-number argument. Domain: [0, infty] |
Definition at line 444 of file incGamma.C.
References incGammaRatio_Q(), and x.
Foam::scalar incGamma_P | ( | const scalar | a, |
const scalar | x | ||
) |
Lower incomplete gamma function.
a | Real-number argument. Domain: (0, infty] |
x | Real-number argument. Domain: [0, infty] |
Definition at line 450 of file incGamma.C.
References incGammaRatio_P(), and x.
Referenced by RosinRammler::meanValue(), and massRosinRammler::sample().