breeze

numerics

package numerics

Provides some functions left out of java.lang.math.

Linear Supertypes
UniversalFuncs, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. numerics
  2. UniversalFuncs
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait Scaling extends AnyRef

    Scaling utilities.

Value Members

  1. object Bessel

    Implementations of the Bessel functions, based on Numerical Recipes

  2. val I: UFunc[Boolean, Double]

    The indicator function.

    The indicator function. 1.0 iff b, else 0.0

  3. val Inf: Double

  4. object IntMath

  5. val NaN: Double

  6. object Scaling extends Scaling

  7. val abs: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  8. val acos: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  9. val asin: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  10. val atan: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  11. val ceil: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  12. def closeTo(a: Double, b: Double, relDiff: Double = 1E-4): Boolean

    closeTo for Doubles.

  13. val cos: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  14. val digamma: UFunc[Double, Double]

    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

  15. val erf: UFunc[Double, Double]

    An approximation to the error function

  16. val erfc: UFunc[Double, Double]

    An approximation to the complementary error function: erfc(x) = 1 - erfc(x)

  17. val erfi: UFunc[Double, Double]

    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

    returns

  18. val exp: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  19. val floor: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  20. def gammp(a: Double, x: Double): Double

    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)

    a
    x

  21. val inf: Double

  22. val lbeta: URFunc[Double, Double]

    Evaluates the log of the generalized beta function.

    Evaluates the log of the generalized beta function. \sum_a lgamma(c(a))- lgamma(c.sum)

  23. def lgamma(a: Double, x: Double): Double

    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

  24. val lgamma: UFunc[Double, Double]

    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

    returns

    an approximation of the log of the Gamma function * of x. Laczos Approximation

  25. val log: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  26. val log1p: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  27. def logDiff(a: Double, b: Double): Double

    Takes the difference of two doubles in log space.

    Takes the difference of two doubles in log space. Requires a &gt 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))

    returns

    log(exp(a) - exp(b))

  28. val logI: UFunc[Boolean, Double]

    The indicator function in log space: 0.

    The indicator function in log space: 0.0 iff b else Double.NegativeInfinity

  29. def logSum(a: Array[Double], length: Int): Double

    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.

    returns

    log(\sum^length exp(a_i))

  30. def logSum(a: Seq[Double]): Double

    Sums together things in log space.

    Sums together things in log space.

    returns

    log(\sum exp(a_i))

  31. def logSum(iter: Iterator[Double], max: Double): Double

    Sums together things in log space.

    Sums together things in log space.

    returns

    log(\sum exp(a_i))

  32. def logSum(a: Double, b: Double, c: Double*): Double

    Sums together things in log space.

    Sums together things in log space.

    returns

    log(\sum exp(a_i))

  33. def logSum(a: Double, b: Double): Double

    Sums together things in log space.

    Sums together things in log space.

    returns

    log(exp(a) + exp(b))

  34. def max(a: Array[Double], length: Int): Double

  35. val nan: Double

  36. def poly(coefs: Array[Double], x: Double): Double

    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.

  37. val rint: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  38. val round: UFunc[Float, Int]

    Definition Classes
    UniversalFuncs
  39. def sigmoid: UFunc[Double, Double]

    The sigmoid function: 1/(1 + exp(-x))

  40. val signum: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  41. val sin: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  42. val sqrt: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  43. val tan: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  44. val toDegrees: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  45. val toRadians: UFunc[Double, Double]

    Definition Classes
    UniversalFuncs
  46. val trigamma: UFunc[Double, Double] { ... /* 2 definitions in type refinement */ }

    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

Inherited from UniversalFuncs

Inherited from AnyRef

Inherited from Any

Ungrouped