Packages

object Integral

The Integral object provides implementations for five basic integration methods:

∫f(x)dx on interval [a, b]

trap - trapezoidal method - linear simpson - Simpson method - quadratic simpson38 - 3/8 Simpson method - cubic boole - Boole Method - quartic romberg - Romberg method - recursive, uses trap

The first four are Composite Newton-Coates type integrators.

See also

en.wikipedia.org/wiki/Newton%E2%80%93Cotes_formulas

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Integral
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def boole(a: Double, b: Double, f: FunctionS2S, sd: Int = SUBDIV): Double

    Integrate '∫f(x)dx' on interval '[a, b]' using the Boole method.

    Integrate '∫f(x)dx' on interval '[a, b]' using the Boole method.

    a

    the start of the integration interval

    b

    the end of the integration interval

    f

    the function to be integrated

    sd

    the number of subdivision (intervals) of [a, b]

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def integrate(on: Interval, f: FunctionS2S): Double

    Integrate '∫f(x)dx' on interval 'on' using the default method.

    Integrate '∫f(x)dx' on interval 'on' using the default method.

    on

    the interval of integration, e.g., (0.0, 2.0)

    f

    the function to be integrated

  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def romberg(a: Double, b: Double, f: FunctionS2S, iter: Int = ITER): Double

    Integrate '∫f(x)dx' on interval '[a, b]' using the Romberg method.

    Integrate '∫f(x)dx' on interval '[a, b]' using the Romberg method. Translation of Java code from the site below to Scala.

    a

    the start of the integration interval

    b

    the end of the integration interval

    f

    the function to be integrated

    iter

    the number of iterative steps

    See also

    cs.roanoke.edu/Spring2012/CPSC402A/Integrate.java FIX: shouldn't need a 2D array/matrix.

  17. def simpson(a: Double, b: Double, f: FunctionS2S, sd: Int = SUBDIV): Double

    Integrate '∫f(x)dx' on interval '[a, b]' using the Simpson method.

    Integrate '∫f(x)dx' on interval '[a, b]' using the Simpson method.

    a

    the start of the integration interval

    b

    the end of the integration interval

    f

    the function to be integrated

    sd

    the number of subdivision (intervals) of [a, b]

  18. def simpson38(a: Double, b: Double, f: FunctionS2S, sd: Int = SUBDIV): Double

    Integrate '∫f(x)dx' on interval '[a, b]' using the 3/8 Simpson method.

    Integrate '∫f(x)dx' on interval '[a, b]' using the 3/8 Simpson method.

    a

    the start of the integration interval

    b

    the end of the integration interval

    f

    the function to be integrated

    sd

    the number of subdivision (intervals) of [a, b]

  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def test(a: Double, b: Double, f: FunctionS2S, ans: Double, sd: Int = SUBDIV): Unit

    Test each of the numerical integrators: '∫f(x)dx' on interval '[a, b]'.

    Test each of the numerical integrators: '∫f(x)dx' on interval '[a, b]'.

    a

    the start of the integration interval

    b

    the end of the integration interval

    f

    the function to be integrated

    ans

    the answer to the integration problem, if known (for % error)

    sd

    the number of subdivision (intervals) of [a, b]

  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. def trap(a: Double, b: Double, f: FunctionS2S, sd: Int = SUBDIV): Double

    Integrate '∫f(x)dx' on interval '[a, b]' using the trapezoidal method.

    Integrate '∫f(x)dx' on interval '[a, b]' using the trapezoidal method.

    a

    the start of the integration interval

    b

    the end of the integration interval

    f

    the function to be integrated

    sd

    the number of subdivision (intervals) of [a, b]

  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. def (on: Interval, f: FunctionS2S): Double

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped