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 derivative of the log gamma function

  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 erfcinv: UFunc[Double, Double]

    Inverse erfc

  18. 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

  19. val erfinv: UFunc[Double, Double]

    Inverse erf

  20. val exp: UFunc[Double, Double]

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

    Definition Classes
    UniversalFuncs
  22. 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
    See also

    http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/special/Gamma.html#regularizedGammaP(double, double)

  23. val inf: Double

  24. 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)

  25. 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

  26. val lgamma: UFunc[Double, Double]

    Computes the log of the gamma function.

    Computes the log of the gamma function.

    returns

    an approximation of the log of the Gamma function of x.

  27. val log: UFunc[Double, Double]

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

    Definition Classes
    UniversalFuncs
  29. 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))

  30. 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

  31. 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))

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

    Sums together things in log space.

    Sums together things in log space.

    returns

    log(\sum exp(a_i))

  33. 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))

  34. 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))

  35. 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))

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

    fast versions of max.

    fast versions of max. Useful for the fast logsum.

  37. val nan: Double

  38. def polyval(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.

  39. val rint: UFunc[Double, Double]

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

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

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

  42. val signum: UFunc[Double, Double]

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

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

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

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

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

    Definition Classes
    UniversalFuncs
  48. val trigamma: UFunc[Double, Double]

    The second derivative of the log gamma function

Inherited from UniversalFuncs

Inherited from AnyRef

Inherited from Any

Ungrouped