module GSL::Integration
Defined in:
gsl/maths/analysis/integrate.crClass Method Summary
- .cquad(function : Proc(Float64, Float64), a : Float64, b : Float64, *, epsabs : Float64 = 0.0, epsrel : Float64 = 0.0, limit = 1000)
- .integrate(function : Proc(Float64, Float64), a : Float64, b : Float64, *, epsabs : Float64 = 0.0, epsrel : Float64 = 0.0, limit = 1000, algorithm : Algorithm = Algorithm::CQUAD)
- .integrate(a : Float64, b : Float64, *, epsabs : Float64 = 0.0, epsrel : Float64 = 0.0, limit = 1000, algorithm : Algorithm = Algorithm::CQUAD, &function : Proc(Float64, Float64))
- .qag(function : Proc(Float64, Float64), a : Float64, b : Float64, *, epsabs : Float64 = 0.0, epsrel : Float64 = 0.0, limit = 1000, key : QAGKey = QAGKey::GSL_INTEG_GAUSS61)
- .qagp(function : Proc(Float64, Float64), points, *, epsabs : Float64 = 0.0, epsrel : Float64 = 0.0, limit = 1000)
- .qags(function : Proc(Float64, Float64), a : Float64, b : Float64, *, epsabs : Float64 = 0.0, epsrel : Float64 = 0.0, limit = 1000)
- .qawc(function : Proc(Float64, Float64), a : Float64, b : Float64, c : Float64, *, epsabs : Float64 = 0.0, epsrel : Float64 = 0.0, limit = 1000)
-
.qng(function : Proc(Float64, Float64), a : Float64, b : Float64, *, epsabs : Float64 = 0.0, epsrel : Float64 = 0.0)
The QNG algorithm is a non-adaptive procedure which uses fixed Gauss-Kronrod-Patterson abscissae to sample the integrand at a maximum of 87 points.
-
.qng(a : Float64, b : Float64, *, epsabs : Float64 = 0.0, epsrel : Float64 = 0.0, &function : Proc(Float64, Float64))
Yielding version of
#qng
Example:result, eps, count = GSL::Integration.qng(0.0, Math::PI/2) { |x| Math.sin(x) }`
- .romberg(function : Proc(Float64, Float64), a : Float64, b : Float64, *, epsabs : Float64 = 0.0, epsrel : Float64 = 0.0, limit = 1000)
Class Method Detail
The QNG algorithm is a non-adaptive procedure which uses fixed Gauss-Kronrod-Patterson abscissae to sample the
integrand at a maximum of 87 points.
It is provided for fast integration of smooth functions
Integrates function
from a
to b
with absolute precision epsabs
OR relative precision epsrel
.
If none of precisions given, it is assumed that epsabs = 1e-9
.
Returns integration result, estimated error and number of evaluations.
Example: ```
f = ->(x : Float64) { Math.sin(x) }
result, eps, count = GSL::Integration.qng(f, 0.0, Math::PI/2)`
Yielding version of #qng
Example: ```
result, eps, count = GSL::Integration.qng(0.0, Math::PI/2) { |x| Math.sin(x) }`