Scaling utilities.
Implementations of the Bessel functions, based on Numerical Recipes
The indicator function.
The indicator function. 1.0 iff b, else 0.0
closeTo for Doubles.
The standard digamma function.
The standard digamma function. Cribbed from Radford Neal
http://google.com/codesearch/p?hl=en#EbB356_xxkI/fbm.2003-06-29/util/digamma.c
An approximation to the error function
An approximation to the complementary error function: erfc(x) = 1 - erfc(x)
The imaginary error function for real argument x.
The imaginary error function for real argument x.
Adapted from http://www.mathworks.com/matlabcentral/newsreader/view_thread/24120 verified against mathematica
regularized incomplete gamma function \int_0x \exp(-t)pow(t,a-1) dt / Gamma(a)
regularized incomplete gamma function \int_0x \exp(-t)pow(t,a-1) dt / Gamma(a)
Evaluates the log of the generalized beta function.
Evaluates the log of the generalized beta function. \sum_a lgamma(c(a))- lgamma(c.sum)
log Incomplete gamma function = \log \int_0x \exp(-t)pow(t,a-1) dt
log Incomplete gamma function = \log \int_0x \exp(-t)pow(t,a-1) dt
Based on NR
Computes the log of the gamma function.
Computes the log of the gamma function.
Reference: Numerical Recipes in C http://www.library.cornell.edu/nr/cbookcpdf.html www.cs.berkeley.edu/~milch/blog/versions/blog-0.1.3/blog/distrib
an approximation of the log of the Gamma function * of x. Laczos Approximation
Takes the difference of two doubles in log space.
Takes the difference of two doubles in log space. Requires a > b. Note that this only works if a and b are close in value. For a >> b, this will almost certainly do nothing. (exp(30) - exp(1) \approx exp(30))
log(exp(a) - exp(b))
The indicator function in log space: 0.
The indicator function in log space: 0.0 iff b else Double.NegativeInfinity
Sums together the first length elements in log space.
Sums together the first length elements in log space. The length parameter is used to make things faster.
This method needs to be fast. Don't scala-ify it.
log(\sum^length exp(a_i))
Sums together things in log space.
Sums together things in log space.
log(\sum exp(a_i))
Sums together things in log space.
Sums together things in log space.
log(\sum exp(a_i))
Sums together things in log space.
Sums together things in log space.
log(\sum exp(a_i))
Sums together things in log space.
Sums together things in log space.
log(exp(a) + exp(b))
Computes the polynomial P(x) with coefficients given in the passed in array.
Computes the polynomial P(x) with coefficients given in the passed in array. coefs(i) is the coef for the x_i term.
The sigmoid function: 1/(1 + exp(-x))
Trigramma function.
Trigramma function. From Apache Commons Math.
http://commons.apache.org/math/api-2.0/src-html/org/apache/commons/math/special/Gamma.html
Provides some functions left out of java.lang.math.