rb-gsl 1.16.0.2 → 1.16.0.3.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +5 -0
- data/README +2 -2
- data/Rakefile +2 -3
- data/lib/gsl/version.rb +1 -1
- data/rdoc/alf.rdoc +5 -5
- data/rdoc/blas.rdoc +8 -8
- data/rdoc/bspline.rdoc +16 -16
- data/rdoc/changes.rdoc +4 -9
- data/rdoc/cheb.rdoc +24 -24
- data/rdoc/cholesky_complex.rdoc +21 -21
- data/rdoc/combi.rdoc +36 -36
- data/rdoc/complex.rdoc +21 -21
- data/rdoc/const.rdoc +46 -46
- data/rdoc/dht.rdoc +48 -48
- data/rdoc/diff.rdoc +41 -41
- data/rdoc/ehandling.rdoc +5 -5
- data/rdoc/eigen.rdoc +152 -152
- data/rdoc/fft.rdoc +145 -145
- data/rdoc/fit.rdoc +108 -108
- data/rdoc/function.rdoc +10 -10
- data/rdoc/graph.rdoc +16 -16
- data/rdoc/hist.rdoc +102 -102
- data/rdoc/hist2d.rdoc +41 -41
- data/rdoc/hist3d.rdoc +8 -8
- data/rdoc/index.rdoc +18 -21
- data/rdoc/integration.rdoc +109 -109
- data/rdoc/interp.rdoc +70 -70
- data/rdoc/intro.rdoc +6 -6
- data/rdoc/linalg.rdoc +187 -187
- data/rdoc/linalg_complex.rdoc +1 -1
- data/rdoc/math.rdoc +57 -57
- data/rdoc/matrix.rdoc +272 -272
- data/rdoc/min.rdoc +56 -56
- data/rdoc/monte.rdoc +21 -21
- data/rdoc/multimin.rdoc +94 -94
- data/rdoc/multiroot.rdoc +79 -79
- data/rdoc/narray.rdoc +31 -31
- data/rdoc/ndlinear.rdoc +53 -53
- data/rdoc/nonlinearfit.rdoc +99 -99
- data/rdoc/ntuple.rdoc +30 -30
- data/rdoc/odeiv.rdoc +87 -87
- data/rdoc/perm.rdoc +89 -89
- data/rdoc/poly.rdoc +65 -65
- data/rdoc/qrng.rdoc +20 -20
- data/rdoc/randist.rdoc +81 -81
- data/rdoc/ref.rdoc +56 -56
- data/rdoc/rng.rdoc +84 -84
- data/rdoc/roots.rdoc +56 -56
- data/rdoc/sf.rdoc +427 -427
- data/rdoc/siman.rdoc +18 -18
- data/rdoc/sort.rdoc +29 -29
- data/rdoc/start.rdoc +8 -8
- data/rdoc/stats.rdoc +51 -51
- data/rdoc/sum.rdoc +11 -11
- data/rdoc/tensor.rdoc +30 -30
- data/rdoc/tut.rdoc +1 -1
- data/rdoc/use.rdoc +37 -37
- data/rdoc/vector.rdoc +187 -187
- data/rdoc/vector_complex.rdoc +23 -23
- data/rdoc/wavelet.rdoc +46 -46
- metadata +17 -20
- data/rdoc/rngextra.rdoc +0 -11
- data/rdoc/screenshot.rdoc +0 -40
data/rdoc/hist2d.rdoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# = GSL::Histogram2d class
|
3
3
|
#
|
4
|
-
# ==
|
4
|
+
# == Class methods
|
5
5
|
# ---
|
6
6
|
# * GSL::Histogram2d.alloc(nx, ny)
|
7
7
|
# * GSL::Histogram2d.alloc(xrange, yrange)
|
@@ -13,13 +13,13 @@
|
|
13
13
|
# 1. With sizes
|
14
14
|
# >> h2 = GSL::Histogram2d.alloc(2, 3) # size 6
|
15
15
|
# >> h2.xrange
|
16
|
-
# => GSL::Histogram::Range:
|
16
|
+
# => GSL::Histogram::Range:
|
17
17
|
# [ 0.000e+00 1.000e+00 2.000e+00 ]
|
18
18
|
# >> h2.yrange
|
19
|
-
# => GSL::Histogram::Range:
|
19
|
+
# => GSL::Histogram::Range:
|
20
20
|
# [ 0.000e+00 1.000e+00 2.000e+00 3.000e+00 ]
|
21
21
|
# >> h2.bin
|
22
|
-
# => GSL::Histogram::Bin:
|
22
|
+
# => GSL::Histogram::Bin:
|
23
23
|
# [ 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00 ]
|
24
24
|
# >> h2.xrange.class.superclass
|
25
25
|
# => GSL::Vector::View::ReadOnly
|
@@ -29,22 +29,22 @@
|
|
29
29
|
# 1. With ranges
|
30
30
|
# >> h2 = Histogram2d.alloc([3, 6, 7], [2, 3, 8])
|
31
31
|
# >> h2.xrange
|
32
|
-
# => GSL::Histogram::Range:
|
32
|
+
# => GSL::Histogram::Range:
|
33
33
|
# [ 3.000e+00 6.000e+00 7.000e+00 ]
|
34
34
|
# >> h2.yrange
|
35
|
-
# => GSL::Histogram::Range:
|
35
|
+
# => GSL::Histogram::Range:
|
36
36
|
# [ 2.000e+00 3.000e+00 8.000e+00 ]
|
37
37
|
# >> h2.bin
|
38
|
-
# => GSL::Histogram::Bin:
|
38
|
+
# => GSL::Histogram::Bin:
|
39
39
|
# [ 0.000e+00 0.000e+00 0.000e+00 0.000e+00 ]
|
40
40
|
#
|
41
41
|
# 1. With sizes and ranges
|
42
42
|
# >> h2 = Histogram2d.alloc(4, [0, 4], 3, [1, 5])
|
43
43
|
# >> h2.xrange
|
44
|
-
# => GSL::Histogram::Range:
|
44
|
+
# => GSL::Histogram::Range:
|
45
45
|
# [ 0.000e+00 1.000e+00 2.000e+00 3.000e+00 4.000e+00 ]
|
46
46
|
# >> h2.yrange
|
47
|
-
# => GSL::Histogram::Range:
|
47
|
+
# => GSL::Histogram::Range:
|
48
48
|
# [ 1.000e+00 2.333e+00 3.667e+00 5.000e+00 ]
|
49
49
|
#
|
50
50
|
# ---
|
@@ -52,25 +52,25 @@
|
|
52
52
|
# * GSL::Histogram2d.equal_bins_p(h1, h2)
|
53
53
|
#
|
54
54
|
#
|
55
|
-
# ==
|
55
|
+
# == Methods
|
56
56
|
# ---
|
57
57
|
# * GSL::Histogram2d#set_ranges(vx, vy)
|
58
58
|
#
|
59
|
-
# This sets the ranges of the existing histogram using
|
60
|
-
# two {GSL::Vector}[link:
|
59
|
+
# This sets the ranges of the existing histogram using
|
60
|
+
# two {GSL::Vector}[link:vector_rdoc.html] objects or arrays.
|
61
61
|
# ---
|
62
62
|
# * GSL::Histogram2d#set_ranges_uniform(xmin, xmax, ymin, ymax)
|
63
63
|
# * GSL::Histogram2d#set_ranges_uniform([xmin, xmax], [ymin, ymax])
|
64
64
|
#
|
65
|
-
# This sets the ranges of the existing histogram <tt>self</tt> to cover
|
66
|
-
# the ranges <tt>xmin</tt> to <tt>xmax</tt> and <tt>ymin</tt> to <tt>ymax</tt> uniformly.
|
65
|
+
# This sets the ranges of the existing histogram <tt>self</tt> to cover
|
66
|
+
# the ranges <tt>xmin</tt> to <tt>xmax</tt> and <tt>ymin</tt> to <tt>ymax</tt> uniformly.
|
67
67
|
# The values of the histogram bins are reset to zero.
|
68
68
|
#
|
69
69
|
# ---
|
70
70
|
# * GSL::Histogram2d#clone
|
71
71
|
# * GSL::Histogram2d#duplicate
|
72
72
|
#
|
73
|
-
# Returns a newly created histogram which is an exact copy of the
|
73
|
+
# Returns a newly created histogram which is an exact copy of the
|
74
74
|
# histogram <tt>self</tt>.
|
75
75
|
#
|
76
76
|
# ---
|
@@ -78,10 +78,10 @@
|
|
78
78
|
# * GSL::Histogram2d#accumulate(x, y, weight = 1)
|
79
79
|
# * GSL::Histogram2d#fill(x, y, weight = 1)
|
80
80
|
#
|
81
|
-
# These method update the histogram <tt>self</tt> by adding <tt>weight</tt>
|
81
|
+
# These method update the histogram <tt>self</tt> by adding <tt>weight</tt>
|
82
82
|
# to the bin whose <tt>x</tt> and <tt>y</tt> ranges contain the coordinates (x,y).
|
83
|
-
# If (x,y) lies outside the limits of the histogram then none of the
|
84
|
-
# bins are modified.
|
83
|
+
# If (x,y) lies outside the limits of the histogram then none of the
|
84
|
+
# bins are modified.
|
85
85
|
#
|
86
86
|
# ---
|
87
87
|
# * GSL::Histogram2d#increment2(x, y, weight = 1)
|
@@ -97,16 +97,16 @@
|
|
97
97
|
# * GSL::Histogram2d#get([i, j])
|
98
98
|
# * GSL::Histogram2d#[i, j]
|
99
99
|
#
|
100
|
-
# Return the contents of the <tt>(i,j)</tt>-th bin of the histogram <tt>self</tt>.
|
100
|
+
# Return the contents of the <tt>(i,j)</tt>-th bin of the histogram <tt>self</tt>.
|
101
101
|
#
|
102
102
|
# ---
|
103
103
|
# * GSL::Histogram2d#get_xrange(i)
|
104
104
|
# * GSL::Histogram2d#get_yrange(j)
|
105
105
|
#
|
106
|
-
# These methods find the upper and lower range limits of the <tt>i</tt>-th
|
106
|
+
# These methods find the upper and lower range limits of the <tt>i</tt>-th
|
107
107
|
# and <tt>j</tt>-th bins in the x and y directions of the histogram <tt>self</tt>.
|
108
108
|
#
|
109
|
-
# Ex:
|
109
|
+
# Ex:
|
110
110
|
# >> h2 = Histogram2d.alloc(2, [0, 2], 3, [1, 4])
|
111
111
|
# >> h2.get_xrange(1)
|
112
112
|
# => [1.0, 2.0]
|
@@ -127,7 +127,7 @@
|
|
127
127
|
# * GSL::Histogram2d#nx
|
128
128
|
# * GSL::Histogram2d#ny
|
129
129
|
#
|
130
|
-
# These methodss return the maximum upper and minimum lower range limits
|
130
|
+
# These methodss return the maximum upper and minimum lower range limits
|
131
131
|
# and the number of bins for the x and y directions of the histogram <tt>self</tt>.
|
132
132
|
#
|
133
133
|
# ---
|
@@ -138,7 +138,7 @@
|
|
138
138
|
# ---
|
139
139
|
# * GSL::Histogram2d#find(x, y)
|
140
140
|
#
|
141
|
-
# Finds the indices i and j to the to the bin which covers the
|
141
|
+
# Finds the indices i and j to the to the bin which covers the
|
142
142
|
# coordinates (<tt>x,y</tt>).
|
143
143
|
#
|
144
144
|
# ---
|
@@ -149,7 +149,7 @@
|
|
149
149
|
# ---
|
150
150
|
# * GSL::Histogram2d#max_bin
|
151
151
|
#
|
152
|
-
# Returns the indices (i,j) of the bin containing the maximum value in
|
152
|
+
# Returns the indices (i,j) of the bin containing the maximum value in
|
153
153
|
# the histogram <tt>self</tt>.
|
154
154
|
#
|
155
155
|
# ---
|
@@ -165,36 +165,36 @@
|
|
165
165
|
# ---
|
166
166
|
# * GSL::Histogram2d#xmean
|
167
167
|
#
|
168
|
-
# Returns the mean of the histogrammed x variable, where the histogram
|
169
|
-
# is regarded as a probability distribution.
|
168
|
+
# Returns the mean of the histogrammed x variable, where the histogram
|
169
|
+
# is regarded as a probability distribution.
|
170
170
|
# Negative bin values are ignored for the purposes of this calculation.
|
171
171
|
#
|
172
172
|
# ---
|
173
173
|
# * GSL::Histogram2d#xsigma
|
174
174
|
#
|
175
|
-
# Returns the standard deviation of the histogrammed x variable,
|
176
|
-
# where the histogram is regarded as a probability distribution.
|
175
|
+
# Returns the standard deviation of the histogrammed x variable,
|
176
|
+
# where the histogram is regarded as a probability distribution.
|
177
177
|
# Negative bin values are ignored for the purposes of this calculation.
|
178
178
|
#
|
179
179
|
# ---
|
180
180
|
# * GSL::Histogram2d#ymean
|
181
181
|
#
|
182
|
-
# Returns the mean of the histogrammed y variable, where the histogram
|
183
|
-
# is regarded as a probability distribution. Negative bin values are
|
182
|
+
# Returns the mean of the histogrammed y variable, where the histogram
|
183
|
+
# is regarded as a probability distribution. Negative bin values are
|
184
184
|
# ignored for the purposes of this calculation.
|
185
185
|
#
|
186
186
|
# ---
|
187
187
|
# * GSL::Histogram2d#ysigma
|
188
188
|
#
|
189
|
-
# Returns the standard deviation of the histogrammed y variable,
|
190
|
-
# where the histogram is regarded as a probability distribution.
|
189
|
+
# Returns the standard deviation of the histogrammed y variable,
|
190
|
+
# where the histogram is regarded as a probability distribution.
|
191
191
|
# Negative bin values are ignored for the purposes of this calculation.
|
192
192
|
#
|
193
193
|
# ---
|
194
194
|
# * GSL::Histogram2d#cov
|
195
195
|
#
|
196
|
-
# Returns the covariance of the histogrammed x and y variables,
|
197
|
-
# where the histogram is regarded as a probability distribution.
|
196
|
+
# Returns the covariance of the histogrammed x and y variables,
|
197
|
+
# where the histogram is regarded as a probability distribution.
|
198
198
|
# Negative bin values are ignored for the purposes of this calculation.
|
199
199
|
#
|
200
200
|
# ---
|
@@ -222,16 +222,16 @@
|
|
222
222
|
# ---
|
223
223
|
# * GSL::Histogram2d#xproject(jstart = 0, jend = ny-1)
|
224
224
|
#
|
225
|
-
# Creates a <tt>GSL::Histogram</tt> object by projecting the 2D histogram
|
225
|
+
# Creates a <tt>GSL::Histogram</tt> object by projecting the 2D histogram
|
226
226
|
# <tt>self</tt> onto the x-axis over the y-range from <tt>jstart</tt> to <tt>jend</tt>.
|
227
227
|
#
|
228
228
|
# ---
|
229
229
|
# * GSL::Histogram2d#yproject(istart = 0, iend = nx-1)
|
230
230
|
#
|
231
|
-
# Creates a <tt>GSL::Histogram</tt> object by projecting the 2D histogram
|
231
|
+
# Creates a <tt>GSL::Histogram</tt> object by projecting the 2D histogram
|
232
232
|
# <tt>self</tt> onto the y-axis over the x-range from <tt>istart</tt> to <tt>iend</tt>.
|
233
233
|
#
|
234
|
-
# ==
|
234
|
+
# == Pdf class
|
235
235
|
# ---
|
236
236
|
# * GSL::Histogram2d::Pdf.alloc(nx, ny)
|
237
237
|
#
|
@@ -246,7 +246,7 @@
|
|
246
246
|
# * GSL::Histogram2d::Pdf#sample(r1, r2)
|
247
247
|
#
|
248
248
|
#
|
249
|
-
# ==
|
249
|
+
# == Example
|
250
250
|
# #!/usr/bin/env ruby
|
251
251
|
# require("gsl")
|
252
252
|
#
|
@@ -271,9 +271,9 @@
|
|
271
271
|
# GSL::graph(hx, hy, "-T X -C -g 3")
|
272
272
|
#
|
273
273
|
#
|
274
|
-
# {prev}[link:
|
275
|
-
# {next}[link:
|
274
|
+
# {prev}[link:hist_rdoc.html]
|
275
|
+
# {next}[link:hist3d_rdoc.html]
|
276
276
|
#
|
277
|
-
# {Reference index}[link:
|
277
|
+
# {Reference index}[link:ref_rdoc.html]
|
278
278
|
# {top}[link:index.html]
|
279
279
|
#
|
data/rdoc/hist3d.rdoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# = GSL::Histogram3d class
|
3
3
|
#
|
4
|
-
# ==
|
4
|
+
# == Class methods
|
5
5
|
# ---
|
6
6
|
# * GSL::Histogram3d.alloc(nx, ny, nz)
|
7
7
|
# * GSL::Histogram3d.alloc(xrange, yrange, zrange)
|
@@ -16,7 +16,7 @@
|
|
16
16
|
# * GSL::Histogram3d.equal_bins_?p(h1, h2)
|
17
17
|
#
|
18
18
|
#
|
19
|
-
# ==
|
19
|
+
# == Methods
|
20
20
|
# ---
|
21
21
|
# * GSL::Histogram3d#set_ranges(xrange, yrange, zrange)
|
22
22
|
# * GSL::Histogram3d#set_ranges_uniform(xmin, xmax, ymin, ymax, zmin, zmax)
|
@@ -89,24 +89,24 @@
|
|
89
89
|
# ---
|
90
90
|
# * GSL::Histogram3d#xyproject(kstart = 0, kend = nz-1)
|
91
91
|
#
|
92
|
-
# Creates a <tt>GSL::Histogram2d</tt> object by projecting the 3D histogram
|
92
|
+
# Creates a <tt>GSL::Histogram2d</tt> object by projecting the 3D histogram
|
93
93
|
# <tt>self</tt> onto the xy-plane over the z-range from <tt>kstart</tt> to <tt>kend</tt>.
|
94
94
|
#
|
95
95
|
# ---
|
96
96
|
# * GSL::Histogram3d#xzproject(jstart = 0, jend = ny-1)
|
97
97
|
#
|
98
|
-
# Creates a <tt>GSL::Histogram2d</tt> object by projecting the 3D histogram
|
98
|
+
# Creates a <tt>GSL::Histogram2d</tt> object by projecting the 3D histogram
|
99
99
|
# <tt>self</tt> onto the xz-plane over the y-range from <tt>jstart</tt> to <tt>jend</tt>.
|
100
100
|
#
|
101
101
|
# ---
|
102
102
|
# * GSL::Histogram3d#yzproject(istart = 0, iend = nx-1)
|
103
103
|
#
|
104
|
-
# Creates a <tt>GSL::Histogram2d</tt> object by projecting the 3D histogram
|
104
|
+
# Creates a <tt>GSL::Histogram2d</tt> object by projecting the 3D histogram
|
105
105
|
# <tt>self</tt> onto the yz-plane over the x-range from <tt>istart</tt> to <tt>iend</tt>.
|
106
106
|
#
|
107
|
-
# {prev}[link:
|
108
|
-
# {next}[link:
|
107
|
+
# {prev}[link:hist2d_rdoc.html]
|
108
|
+
# {next}[link:ntuple_rdoc.html]
|
109
109
|
#
|
110
|
-
# {Reference index}[link:
|
110
|
+
# {Reference index}[link:ref_rdoc.html]
|
111
111
|
# {top}[link:index.html]
|
112
112
|
#
|
data/rdoc/index.rdoc
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
#
|
2
|
-
# = {Ruby/GSL}[link:
|
2
|
+
# = {Ruby/GSL}[link:index.html]
|
3
3
|
#
|
4
4
|
# Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License.
|
5
5
|
#
|
6
|
-
# ==
|
7
|
-
# {Ruby/GSL}[
|
6
|
+
# == Description
|
7
|
+
# {Ruby/GSL}[https://blackwinter.github.com/rb-gsl] is a ruby interface to the {GNU Scientific Library}[https://gnu.org/software/gsl/] (GSL), for numerical computing with {Ruby}[http://www.ruby-lang.org/en/].
|
8
8
|
#
|
9
|
-
# ==
|
10
|
-
# ===
|
9
|
+
# == Installation
|
10
|
+
# === Using the gem command
|
11
11
|
# Ruby/GSL may now be installed as a Ruby Gem by simply running
|
12
12
|
#
|
13
13
|
# gem install rb-gsl
|
@@ -16,38 +16,35 @@
|
|
16
16
|
# can be installed.
|
17
17
|
#
|
18
18
|
# * It is recommended to install the
|
19
|
-
# {GNU plotutils}[
|
19
|
+
# {GNU plotutils}[https://gnu.org/software/plotutils/plotutils.html]
|
20
20
|
# package. Some of the example scripts in the 'examples/' directory use the
|
21
21
|
# <tt>graph</tt> utility included in the package to plot the results.
|
22
22
|
# Windows-cygwin binaries of <tt>GNU plotutils</tt> and related packages are
|
23
|
-
# available from {here}[http://
|
23
|
+
# available from {here}[http://gnuwin32.sourceforge.net/packages/plotutils.htm].
|
24
24
|
#
|
25
|
-
# ==
|
25
|
+
# == Reference
|
26
26
|
#
|
27
|
-
# Ruby/GSL
|
28
|
-
#
|
29
|
-
# == {}[link:index.html"name="5] Reference
|
30
|
-
#
|
31
|
-
# The {Ruby/GSL reference manual}[link:doc/rdoc/ref_rdoc.html] follows and borrows
|
27
|
+
# The {Ruby/GSL reference manual}[link:ref_rdoc.html] follows and borrows
|
32
28
|
# large parts of the GSL reference manual.
|
33
29
|
#
|
34
|
-
# ==
|
30
|
+
# == Examples
|
35
31
|
# See scripts in <tt>examples/</tt> and <tt>tests/</tt> directories.
|
36
32
|
#
|
37
|
-
# ==
|
38
|
-
# * {ruby-gsl:}[http://ruby-gsl.sourceforge.net/
|
39
|
-
# Another Ruby
|
33
|
+
# == Related Projects
|
34
|
+
# * {ruby-gsl:}[http://ruby-gsl.sourceforge.net/]
|
35
|
+
# Another Ruby binding, developed by Arno Erpenbeck.
|
40
36
|
#
|
41
|
-
# ==
|
37
|
+
# == Licence
|
42
38
|
# Ruby/GSL is free software: you can redistribute it and/or modify it
|
43
39
|
# under the terms of the GNU General Public License.
|
44
40
|
# This library is distributed in the hope that it will be useful, but
|
45
41
|
# WITHOUT ANY WARRANTY.
|
46
42
|
#
|
47
|
-
# ==
|
43
|
+
# == Bug Report
|
48
44
|
# If you encounter bugs in Ruby/GSL, please e-mail to me, or
|
49
|
-
# submit reports
|
45
|
+
# submit reports on {GitHub}[https://github.com/blackwinter/rb-gsl/issues].
|
50
46
|
#
|
51
|
-
# ==
|
47
|
+
# == Authors
|
52
48
|
# Yoshiki Tsunesada:: July, 2004
|
53
49
|
# David MacMahon:: November, 2010
|
50
|
+
# Jens Wille:: November, 2013
|
data/rdoc/integration.rdoc
CHANGED
@@ -1,46 +1,46 @@
|
|
1
1
|
#
|
2
2
|
# = Numerical Integration
|
3
3
|
# Contents:
|
4
|
-
# 1. {Introduction}[link:
|
5
|
-
# 1. {QNG non-adaptive Gauss-Kronrod integration}[link:
|
6
|
-
# 1. {QAG adaptive integration}[link:
|
7
|
-
# 1. {GSL::Integration::Workspace class}[link:
|
8
|
-
# 1. {Methods}[link:
|
9
|
-
# 1. {QAGS adaptive integration with singularities}[link:
|
10
|
-
# 1. {QAGP adaptive integration with known singular points}[link:
|
11
|
-
# 1. {QAGI adaptive integration on infinite intervals}[link:
|
12
|
-
# 1. {QAWC adaptive integration for Cauchy principal values}[link:
|
13
|
-
# 1. {QAWS adaptive integration for singular functions}[link:
|
14
|
-
# 1. {QAWO adaptive integration for oscillatory functions}[link:
|
15
|
-
# 1. {QAWF adaptive integration for Fourier integrals}[link:
|
16
|
-
#
|
17
|
-
# ==
|
18
|
-
# This section describes how to compute numerical integration of a function
|
19
|
-
# in one dimension. In Ruby/GSL, all the GSL routines for numerical integration
|
20
|
-
# is provided as methods of {GSL::Function}[link:
|
21
|
-
# For example, a <tt>GSL::Function</tt> object which represents the sine function
|
4
|
+
# 1. {Introduction}[link:integration_rdoc.html#label-Introduction]
|
5
|
+
# 1. {QNG non-adaptive Gauss-Kronrod integration}[link:integration_rdoc.html#label-QNG+non-adaptive+Gauss-Kronrod+integration]
|
6
|
+
# 1. {QAG adaptive integration}[link:integration_rdoc.html#label-QAG+adaptive+integration]
|
7
|
+
# 1. {GSL::Integration::Workspace class}[link:integration_rdoc.html#label-Workspace+class]
|
8
|
+
# 1. {Methods}[link:integration_rdoc.html#label-Methods]
|
9
|
+
# 1. {QAGS adaptive integration with singularities}[link:integration_rdoc.html#label-QAGS+adaptive+integration+with+singularities]
|
10
|
+
# 1. {QAGP adaptive integration with known singular points}[link:integration_rdoc.html#label-QAGP+adaptive+integration+with+known+singular+points]
|
11
|
+
# 1. {QAGI adaptive integration on infinite intervals}[link:integration_rdoc.html#label-QAGI+adaptive+integration+on+infinite+intervals]
|
12
|
+
# 1. {QAWC adaptive integration for Cauchy principal values}[link:integration_rdoc.html#label-QAWC+adaptive+integration+for+Cauchy+principal+values]
|
13
|
+
# 1. {QAWS adaptive integration for singular functions}[link:integration_rdoc.html#label-QAWS+adaptive+integration+for+singular+functions]
|
14
|
+
# 1. {QAWO adaptive integration for oscillatory functions}[link:integration_rdoc.html#label-QAWO+adaptive+integration+for+oscillatory+functions]
|
15
|
+
# 1. {QAWF adaptive integration for Fourier integrals}[link:integration_rdoc.html#label-QAWF+adaptive+integration+for+Fourier+integrals]
|
16
|
+
#
|
17
|
+
# == Introduction
|
18
|
+
# This section describes how to compute numerical integration of a function
|
19
|
+
# in one dimension. In Ruby/GSL, all the GSL routines for numerical integration
|
20
|
+
# is provided as methods of {GSL::Function}[link:function_rdoc.html] objects.
|
21
|
+
# For example, a <tt>GSL::Function</tt> object which represents the sine function
|
22
22
|
# <tt>sin(x)</tt> can be expressed as
|
23
23
|
# f = GSL::Function.alloc { |x| sin(x) }
|
24
|
-
# To compute numerical integration of <tt>sin(x)</tt> over the range <tt>(a, b)</tt>,
|
24
|
+
# To compute numerical integration of <tt>sin(x)</tt> over the range <tt>(a, b)</tt>,
|
25
25
|
# one can use the methods <tt>integrate_xxx</tt> or simply <tt>xxx</tt>, as
|
26
26
|
# * <tt>f.integrate_xxx([a, b])</tt>, or <tt>f.xxx([a, b])</tt>
|
27
27
|
# * <tt>f.integrate_xxx(a, b)</tt>, or <tt>f.xxx(a, b)</tt>
|
28
28
|
#
|
29
|
-
# ==
|
29
|
+
# == QNG non-adaptive Gauss-Kronrod integration
|
30
30
|
# ---
|
31
31
|
# * GSL::Function#integration_qng([a, b], [epsabs = 0.0, epsrel = 1e-10])
|
32
32
|
# * GSL::Function#qng(...)
|
33
33
|
# * GSL::Integration::qng(...)
|
34
34
|
#
|
35
|
-
# These methods apply the Gauss-Kronrod integration rules in succession until
|
36
|
-
# an estimate of the integral of the reciever function (a <tt>GSL::Function</tt>
|
37
|
-
# object) over <tt>(a,b)</tt> is achieved within the desired absolute and relative
|
35
|
+
# These methods apply the Gauss-Kronrod integration rules in succession until
|
36
|
+
# an estimate of the integral of the reciever function (a <tt>GSL::Function</tt>
|
37
|
+
# object) over <tt>(a,b)</tt> is achieved within the desired absolute and relative
|
38
38
|
# error limits, <tt>epsabs</tt> and <tt>epsrel</tt> (these are optional, the default
|
39
39
|
# values are 0,0 and 1e-10 respectively). These methods return an array of
|
40
|
-
# four elements <tt>[result, err, neval, status]</tt>, those are the final
|
41
|
-
# approximation
|
42
|
-
# of the integration, an estimate of the absolute error, the number of function
|
43
|
-
# evaluation, and the status which is returned by the GSL
|
40
|
+
# four elements <tt>[result, err, neval, status]</tt>, those are the final
|
41
|
+
# approximation
|
42
|
+
# of the integration, an estimate of the absolute error, the number of function
|
43
|
+
# evaluation, and the status which is returned by the GSL
|
44
44
|
# <tt>integration_qng()</tt> function.
|
45
45
|
#
|
46
46
|
# * Ex: Integrate sin(x) over <tt>x = 0 -- 2</tt> with accuracies <tt>epsabs = 0, epsrel = 1.0e-7</tt>.
|
@@ -53,20 +53,20 @@
|
|
53
53
|
#
|
54
54
|
# For all the methods described in this section, the arguments <tt>[epsabs, epsrel]</tt> are optional, and the default values are <tt>[epsabs = 0.0, epsrel = 1e-10]</tt>.
|
55
55
|
#
|
56
|
-
# ==
|
57
|
-
# The QAG algorithm is a simple adaptive integration procedure.
|
58
|
-
# The integration region is divided into subintervals, and on each iteration
|
59
|
-
# the subinterval with the largest estimated error is bisected.
|
56
|
+
# == QAG adaptive integration
|
57
|
+
# The QAG algorithm is a simple adaptive integration procedure.
|
58
|
+
# The integration region is divided into subintervals, and on each iteration
|
59
|
+
# the subinterval with the largest estimated error is bisected.
|
60
60
|
# This reduces the overall error rapidly, as the subintervals become concentrated
|
61
|
-
# around local difficulties in the integrand. These subintervals are managed by
|
62
|
-
# a GSL::Integration::Workspace object, which handles the memory for the
|
61
|
+
# around local difficulties in the integrand. These subintervals are managed by
|
62
|
+
# a GSL::Integration::Workspace object, which handles the memory for the
|
63
63
|
# subinterval ranges, results and error estimates.
|
64
64
|
#
|
65
|
-
# ===
|
65
|
+
# === Workspace class
|
66
66
|
# ---
|
67
67
|
# * GSL::Integration::Workspace.alloc(n = 1000)
|
68
68
|
#
|
69
|
-
# This creates a workspace sufficient to hold n double precision intervals,
|
69
|
+
# This creates a workspace sufficient to hold n double precision intervals,
|
70
70
|
# their integration results and error estimates.
|
71
71
|
#
|
72
72
|
# ---
|
@@ -74,11 +74,11 @@
|
|
74
74
|
# * GSL::Integration::Workspace#size
|
75
75
|
#
|
76
76
|
#
|
77
|
-
# ====
|
77
|
+
# ==== Algorithms which require the workspace
|
78
78
|
# The algorithms described below require <tt>gsl_integration_workspace</tt> struct
|
79
|
-
# in C. In Ruby/GSL, the corresponding methods require
|
79
|
+
# in C. In Ruby/GSL, the corresponding methods require
|
80
80
|
# a <tt>GSL::Integration::Workspace</tt> object in their arguments. But it is also
|
81
|
-
# possible to use these methods without workspace arguments: if it
|
81
|
+
# possible to use these methods without workspace arguments: if it
|
82
82
|
# is not given, a workspace is created/destroyed internally. Thus
|
83
83
|
# method calls are as
|
84
84
|
#
|
@@ -89,10 +89,10 @@
|
|
89
89
|
# w = GSL::Integration::Workspace.alloc(limit)
|
90
90
|
# p f.qag([a, b], w)
|
91
91
|
#
|
92
|
-
# Explicit uses of a <tt>Workspace</tt> object reduce C function calls for memory
|
93
|
-
# allocations of workspace objects.
|
92
|
+
# Explicit uses of a <tt>Workspace</tt> object reduce C function calls for memory
|
93
|
+
# allocations of workspace objects.
|
94
94
|
#
|
95
|
-
# ===
|
95
|
+
# === Methods
|
96
96
|
# ---
|
97
97
|
# * GSL::Function#integration_qag([a, b], key = GSL::Integration::GAUSS61)
|
98
98
|
# * GSL::Function#integration_qag([a, b], key, w)
|
@@ -102,15 +102,15 @@
|
|
102
102
|
# * GSL::Function#qag(...)
|
103
103
|
# * GSL::Integration::qag(...)
|
104
104
|
#
|
105
|
-
# These methods apply an integration rule adaptively until an estimate of the
|
106
|
-
# integral of the reciever function over <tt>(a,b)</tt> is achieved within the
|
105
|
+
# These methods apply an integration rule adaptively until an estimate of the
|
106
|
+
# integral of the reciever function over <tt>(a,b)</tt> is achieved within the
|
107
107
|
# desired absolute and relative error limits, <tt>epsabs</tt> and <tt>epsrel</tt>.
|
108
108
|
# One can give a <tt>GSL::Integration::Workspace</tt> object <tt>w</tt> with the
|
109
109
|
# last argument (option: if not given, the workspace is internally allocated and
|
110
|
-
# freed). The method returns an array with four elements
|
111
|
-
# <tt>[result, err, neval, status]</tt>.
|
112
|
-
# The integration rule is determined by the value of key, which should be
|
113
|
-
# chosen from the following symbolic names,
|
110
|
+
# freed). The method returns an array with four elements
|
111
|
+
# <tt>[result, err, neval, status]</tt>.
|
112
|
+
# The integration rule is determined by the value of key, which should be
|
113
|
+
# chosen from the following symbolic names,
|
114
114
|
#
|
115
115
|
# GSL::Integration::GAUSS15 (key = 1)
|
116
116
|
# GSL::Integration::GAUSS21 (key = 2)
|
@@ -119,18 +119,18 @@
|
|
119
119
|
# GSL::Integration::GAUSS51 (key = 5)
|
120
120
|
# GSL::Integration::GAUSS61 (key = 6)
|
121
121
|
#
|
122
|
-
# corresponding to the 15, 21, 31, 41, 51 and 61 point Gauss-Kronrod rules. The
|
123
|
-
# higher-order rules give better accuracy for smooth functions,
|
124
|
-
# while lower-order rules save time when the function contains local
|
125
|
-
# difficulties, such as discontinuities.
|
126
|
-
#
|
127
|
-
# ==
|
128
|
-
# The presence of an integrable singularity in the integration region causes
|
129
|
-
# an adaptive routine to concentrate new subintervals around the singularity.
|
130
|
-
# As the subintervals decrease in size the successive approximations to the
|
131
|
-
# integral converge in a limiting fashion. This approach to the limit can be
|
132
|
-
# accelerated using an extrapolation procedure.
|
133
|
-
# The QAGS algorithm combines adaptive bisection with the Wynn epsilon-algorithm
|
122
|
+
# corresponding to the 15, 21, 31, 41, 51 and 61 point Gauss-Kronrod rules. The
|
123
|
+
# higher-order rules give better accuracy for smooth functions,
|
124
|
+
# while lower-order rules save time when the function contains local
|
125
|
+
# difficulties, such as discontinuities.
|
126
|
+
#
|
127
|
+
# == QAGS adaptive integration with singularities
|
128
|
+
# The presence of an integrable singularity in the integration region causes
|
129
|
+
# an adaptive routine to concentrate new subintervals around the singularity.
|
130
|
+
# As the subintervals decrease in size the successive approximations to the
|
131
|
+
# integral converge in a limiting fashion. This approach to the limit can be
|
132
|
+
# accelerated using an extrapolation procedure.
|
133
|
+
# The QAGS algorithm combines adaptive bisection with the Wynn epsilon-algorithm
|
134
134
|
# to speed up the integration of many types of integrable singularities.
|
135
135
|
#
|
136
136
|
# ---
|
@@ -140,12 +140,12 @@
|
|
140
140
|
# * GSL::Function#qags(...)
|
141
141
|
# * GSL::Integration::qags(...)
|
142
142
|
#
|
143
|
-
# These methods apply the Gauss-Kronrod 21-point integration rule
|
144
|
-
# adaptively until an estimate of the integral over <tt>(a,b)</tt> is
|
145
|
-
# achieved within the desired absolute and relative error limits,
|
146
|
-
# <tt>epsabs</tt> and <tt>epsrel</tt>. The results are extrapolated using the
|
147
|
-
# epsilon-algorithm, which accelerates the convergence of the integral
|
148
|
-
# in the presence of discontinuities and integrable singularities.
|
143
|
+
# These methods apply the Gauss-Kronrod 21-point integration rule
|
144
|
+
# adaptively until an estimate of the integral over <tt>(a,b)</tt> is
|
145
|
+
# achieved within the desired absolute and relative error limits,
|
146
|
+
# <tt>epsabs</tt> and <tt>epsrel</tt>. The results are extrapolated using the
|
147
|
+
# epsilon-algorithm, which accelerates the convergence of the integral
|
148
|
+
# in the presence of discontinuities and integrable singularities.
|
149
149
|
# The maximum number of subintervals is given by <tt>limit</tt>.
|
150
150
|
#
|
151
151
|
# * ex:
|
@@ -155,22 +155,22 @@
|
|
155
155
|
# }
|
156
156
|
#
|
157
157
|
# # create the function, with the parameter alpha = 1.0
|
158
|
-
# f = GSL::Function.alloc(proc, 1.0)
|
158
|
+
# f = GSL::Function.alloc(proc, 1.0)
|
159
159
|
#
|
160
160
|
# p f.integration_qags(0, 1)
|
161
161
|
#
|
162
|
-
# ==
|
162
|
+
# == QAGP adaptive integration with known singular points
|
163
163
|
# ---
|
164
164
|
# * GSL::Function#integration_qagp(pts, [epsabs = 0.0, epsrel = 1e-10], limit = 1000, w)
|
165
165
|
# * GSL::Function#qagp(...)
|
166
166
|
# * GSL::Integration::qagp(...)
|
167
167
|
#
|
168
|
-
# These methods apply the adaptive integration algorithm QAGS taking
|
169
|
-
# account of the user-supplied locations of singular points. The array
|
170
|
-
# <tt>pts</tt> (a Ruby array or a GSL::Vector object) should contain the
|
168
|
+
# These methods apply the adaptive integration algorithm QAGS taking
|
169
|
+
# account of the user-supplied locations of singular points. The array
|
170
|
+
# <tt>pts</tt> (a Ruby array or a GSL::Vector object) should contain the
|
171
171
|
# endpoints of the integration ranges defined by the integration region a
|
172
|
-
# nd locations of the singularities. For example, to integrate over the
|
173
|
-
# region <tt>(a,b)</tt> with break-points at x_1, x_2, x_3
|
172
|
+
# nd locations of the singularities. For example, to integrate over the
|
173
|
+
# region <tt>(a,b)</tt> with break-points at x_1, x_2, x_3
|
174
174
|
# (where a < x_1 < x_2 < x_3 < b) the following <tt>pts</tt> array should be used
|
175
175
|
#
|
176
176
|
# pts[0] = a
|
@@ -191,18 +191,18 @@
|
|
191
191
|
# p f454.qagp(pts, 0.0, 1e-3) # <---- [52.7408061167272, 0.000175570384826074, 20, 0]
|
192
192
|
# # Expect: 61 log(2) + (77/4) log(7) - 27 = 52.7408061167272
|
193
193
|
#
|
194
|
-
# ==
|
194
|
+
# == QAGI adaptive integration on infinite intervals
|
195
195
|
# ---
|
196
196
|
# * GSL::Function#integration_qagi([epsabs = 0.0, epsrel = 1e-10], limit = 1000, w)
|
197
197
|
# * GSL::Function#qagi(...)
|
198
198
|
# * GSL::Integration::qagi(...)
|
199
199
|
#
|
200
|
-
# These methods compute the integral of the function over the infinite
|
200
|
+
# These methods compute the integral of the function over the infinite
|
201
201
|
# interval (-infty,+infty). The integral is mapped onto the interval
|
202
|
-
# (0,1] using the transformation x = (1-t)/t. It is then integrated using
|
203
|
-
# the QAGS algorithm. The normal 21-point Gauss-Kronrod rule of QAGS is
|
204
|
-
# replaced by a 15-point rule, because the transformation can generate an
|
205
|
-
# integrable singularity at the origin. In this case a lower-order rule is
|
202
|
+
# (0,1] using the transformation x = (1-t)/t. It is then integrated using
|
203
|
+
# the QAGS algorithm. The normal 21-point Gauss-Kronrod rule of QAGS is
|
204
|
+
# replaced by a 15-point rule, because the transformation can generate an
|
205
|
+
# integrable singularity at the origin. In this case a lower-order rule is
|
206
206
|
# more efficient.
|
207
207
|
#
|
208
208
|
# * ex
|
@@ -220,9 +220,9 @@
|
|
220
220
|
# * GSL::Function#qagiu(...)
|
221
221
|
# * GSL::Integration::qagiu(...)
|
222
222
|
#
|
223
|
-
# These methods compute the integral of the function over the
|
223
|
+
# These methods compute the integral of the function over the
|
224
224
|
# semi-infinite interval (a,+infty).
|
225
|
-
#
|
225
|
+
#
|
226
226
|
# ---
|
227
227
|
# * GSL::Function#integration_qagil(b, epsabs = 0.0, epsrel = 1e-10, limit = 1000)
|
228
228
|
# * GSL::Function#integration_qagil(b, epsabs = 0.0, epsrel = 1e-10, w)
|
@@ -230,22 +230,22 @@
|
|
230
230
|
# * GSL::Function#qagil(...)
|
231
231
|
# * GSL::Integration::qagil(...)
|
232
232
|
#
|
233
|
-
# These methods compute the integral of the function over the
|
233
|
+
# These methods compute the integral of the function over the
|
234
234
|
# semi-infinite interval (-infty,b).
|
235
235
|
#
|
236
|
-
# ==
|
236
|
+
# == QAWC adaptive integration for Cauchy principal values
|
237
237
|
# ---
|
238
238
|
# * GSL::Function#integration_qawc([a, b], c, [epsabs = 0.0, epsrel = 1e-10], limit. 1000)
|
239
239
|
# * GSL::Function#qawc(...)
|
240
240
|
# * GSL::Function#qawc(...)
|
241
241
|
#
|
242
|
-
# These methods compute the Cauchy principal value of the integral over
|
243
|
-
# <tt>(a,b)</tt>, with a singularity at <tt>c</tt>. The adaptive bisection algorithm
|
244
|
-
# of QAG is used, with modifications to ensure that subdivisions do not occur
|
245
|
-
# at the singular point <tt>x = c</tt>. When a subinterval contains the point
|
246
|
-
# <tt>x = c</tt> or is close to it then a special 25-point modified
|
247
|
-
# Clenshaw-Curtis rule is used to control the singularity. Further away from
|
248
|
-
# the singularity the algorithm uses an ordinary 15-point Gauss-Kronrod
|
242
|
+
# These methods compute the Cauchy principal value of the integral over
|
243
|
+
# <tt>(a,b)</tt>, with a singularity at <tt>c</tt>. The adaptive bisection algorithm
|
244
|
+
# of QAG is used, with modifications to ensure that subdivisions do not occur
|
245
|
+
# at the singular point <tt>x = c</tt>. When a subinterval contains the point
|
246
|
+
# <tt>x = c</tt> or is close to it then a special 25-point modified
|
247
|
+
# Clenshaw-Curtis rule is used to control the singularity. Further away from
|
248
|
+
# the singularity the algorithm uses an ordinary 15-point Gauss-Kronrod
|
249
249
|
# integration rule.
|
250
250
|
#
|
251
251
|
# * ex:
|
@@ -254,10 +254,10 @@
|
|
254
254
|
#
|
255
255
|
# p f459.qawc([-1.0, 5.0], 0, [0.0, 1e-3]) # Expect: log(125/631)/18
|
256
256
|
#
|
257
|
-
# ==
|
258
|
-
# The QAWS algorithm is designed for integrands with algebraic-logarithmic
|
259
|
-
# singularities at the end-points of an integration region.
|
260
|
-
# In order to work efficiently the algorithm requires a precomputed
|
257
|
+
# == QAWS adaptive integration for singular functions
|
258
|
+
# The QAWS algorithm is designed for integrands with algebraic-logarithmic
|
259
|
+
# singularities at the end-points of an integration region.
|
260
|
+
# In order to work efficiently the algorithm requires a precomputed
|
261
261
|
# table of Chebyshev moments.
|
262
262
|
#
|
263
263
|
# ---
|
@@ -266,8 +266,8 @@
|
|
266
266
|
# * GSL::Function#qaws(...)
|
267
267
|
# * GSL::Integration::qaws(...)
|
268
268
|
#
|
269
|
-
# These methods compute the integral of the function over the interval
|
270
|
-
# <tt>(a,b)</tt> with the singular weight function
|
269
|
+
# These methods compute the integral of the function over the interval
|
270
|
+
# <tt>(a,b)</tt> with the singular weight function
|
271
271
|
# (x-a)^alpha (b-x)^beta log^mu (x-a) log^nu (b-x)
|
272
272
|
# The parameters <tt>[alpha, beta, mu, nu]</tt> is given by a Ruby array
|
273
273
|
# <tt>table</tt>, or by a <tt>GSL::Integration::QAWS_Table</tt> object.
|
@@ -292,9 +292,9 @@
|
|
292
292
|
# table = Integration::QAWS_Table.alloc(0.0, 0.0, 1, 0)
|
293
293
|
# p f458.qaws([0.0, 1.0], table, [0.0, 1e-10])
|
294
294
|
#
|
295
|
-
# ==
|
296
|
-
# The QAWO algorithm is designed for integrands with an oscillatory factor,
|
297
|
-
# sin(omega x) or cos(omega x). In order to work efficiently the algorithm
|
295
|
+
# == QAWO adaptive integration for oscillatory functions
|
296
|
+
# The QAWO algorithm is designed for integrands with an oscillatory factor,
|
297
|
+
# sin(omega x) or cos(omega x). In order to work efficiently the algorithm
|
298
298
|
# requires a table of Chebyshev moments.
|
299
299
|
#
|
300
300
|
#
|
@@ -303,7 +303,7 @@
|
|
303
303
|
# * GSL::Function#qawo(...)
|
304
304
|
# * GSL::Integration::qawo(...)
|
305
305
|
#
|
306
|
-
# This method uses an adaptive algorithm to compute the integral over
|
306
|
+
# This method uses an adaptive algorithm to compute the integral over
|
307
307
|
# <tt>[a,b]</tt> with the weight function sin(omega x) or cos(omega x) defined by
|
308
308
|
# the table <tt>table</tt>.
|
309
309
|
#
|
@@ -324,7 +324,7 @@
|
|
324
324
|
# table = Integration::QAWO_Table.alloc(10.0*Math::PI, 1.0, Integration::SINE, 1000)
|
325
325
|
# p f456.qawo(0.0, [0.0, 1e-10], table)
|
326
326
|
#
|
327
|
-
# ==
|
327
|
+
# == QAWF adaptive integration for Fourier integrals
|
328
328
|
# ---
|
329
329
|
# * GSL::Function#integration_qawf(a, epsabs = 1e-10, limit = 1000, w, wc, table)
|
330
330
|
# * GSL::Function#integration_qawf(a, epsabs = 1e-10, limit = 1000, table)
|
@@ -334,14 +334,14 @@
|
|
334
334
|
# * GSL::Function#qawf(...)
|
335
335
|
# * GSL::Integration::qawf(...)
|
336
336
|
#
|
337
|
-
# This method attempts to compute a Fourier integral of the function over
|
337
|
+
# This method attempts to compute a Fourier integral of the function over
|
338
338
|
# the semi-infinite interval [a,+infty).
|
339
339
|
#
|
340
340
|
# I = \int_a^{+infty} dx f(x) sin(omega x)
|
341
341
|
# I = \int_a^{+infty} dx f(x) cos(omega x)
|
342
342
|
#
|
343
|
-
# The parameter omega is taken from the table <tt>table</tt> (the length <tt>L|</tt>
|
344
|
-
# can take any value, since it is overridden by this function to a value
|
343
|
+
# The parameter omega is taken from the table <tt>table</tt> (the length <tt>L|</tt>
|
344
|
+
# can take any value, since it is overridden by this function to a value
|
345
345
|
# appropriate for the fourier integration).
|
346
346
|
#
|
347
347
|
# * ex:
|
@@ -373,15 +373,15 @@
|
|
373
373
|
# p f457.qawf(0.0, limit, w, table) # Error
|
374
374
|
# p f457.qawf(0.0, limit, wc, table) # Error
|
375
375
|
#
|
376
|
-
# ==
|
376
|
+
# == Gauss-Legendre integration
|
377
377
|
# (GSL-1.14)
|
378
378
|
# The fixed-order Gauss-Legendre integration routines are provided for fast integration of smooth functions with known polynomial order. The n-point Gauss-Legendre rule is exact for polynomials of order 2*n-1 or less. For example, these rules are useful when integrating basis functions to form mass matrices for the Galerkin method. Unlike other numerical integration routines within the library, these routines do not accept absolute or relative error bounds.
|
379
379
|
#
|
380
380
|
# ---
|
381
381
|
# * GSL::Integration::Glfixed_table.alloc(n)
|
382
382
|
#
|
383
|
-
# Determines the Gauss-Legendre abscissae and weights necessary for an <tt>n</tt>-point fixed order
|
384
|
-
# integration scheme. If possible, high precision precomputed coefficients are used.
|
383
|
+
# Determines the Gauss-Legendre abscissae and weights necessary for an <tt>n</tt>-point fixed order
|
384
|
+
# integration scheme. If possible, high precision precomputed coefficients are used.
|
385
385
|
# If precomputed weights are not available, lower precision coefficients are computed on the fly.
|
386
386
|
#
|
387
387
|
# ---
|
@@ -389,10 +389,10 @@
|
|
389
389
|
#
|
390
390
|
# Applies the Gauss-Legendre integration rule contained in table <tt>t</tt> and returns the result.
|
391
391
|
#
|
392
|
-
# {prev}[link:
|
393
|
-
# {next}[link:
|
392
|
+
# {prev}[link:wavelet_rdoc.html]
|
393
|
+
# {next}[link:rng_rdoc.html]
|
394
394
|
#
|
395
|
-
# {Reference index}[link:
|
395
|
+
# {Reference index}[link:ref_rdoc.html]
|
396
396
|
# {top}[link:index.html]
|
397
397
|
#
|
398
398
|
#
|