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/siman.rdoc
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#
|
2
2
|
# = Simulated Annealing
|
3
|
-
# ===
|
3
|
+
# === Library
|
4
4
|
#
|
5
|
-
# ==
|
5
|
+
# == Module and classes
|
6
6
|
# * GSL::
|
7
7
|
# * Siman:: (Module)
|
8
8
|
# * Params (Class)
|
@@ -11,31 +11,31 @@
|
|
11
11
|
# * Metric (Class)
|
12
12
|
# * Print (Class)
|
13
13
|
#
|
14
|
-
# ==
|
15
|
-
# ===
|
14
|
+
# == <tt>Siman</tt> Module
|
15
|
+
# === Singleton method
|
16
16
|
# ---
|
17
17
|
# * GSL::Siman.solve(rng, x0_p, efunc, stepper, metric, printer, params)
|
18
18
|
#
|
19
|
-
# This performs a simulated annealing search through a given space.
|
20
|
-
# The space is specified by providing the functions <tt>efunc</tt> and <tt>metric</tt>.
|
21
|
-
# The simulated annealing steps are generated using the random number generator
|
22
|
-
# <tt>rng</tt> and the function <tt>stepper</tt>. The starting configuration of the
|
19
|
+
# This performs a simulated annealing search through a given space.
|
20
|
+
# The space is specified by providing the functions <tt>efunc</tt> and <tt>metric</tt>.
|
21
|
+
# The simulated annealing steps are generated using the random number generator
|
22
|
+
# <tt>rng</tt> and the function <tt>stepper</tt>. The starting configuration of the
|
23
23
|
# system should be given by a <tt>Vector</tt> object <tt>x0_p</tt>.
|
24
|
-
#
|
25
|
-
# The parameter <tt>params</tt> controls the run by providing the temperature
|
24
|
+
#
|
25
|
+
# The parameter <tt>params</tt> controls the run by providing the temperature
|
26
26
|
# schedule and other tunable parameters to the algorithm.
|
27
27
|
#
|
28
|
-
# On exit the best result achieved during the search is placed in <tt>x0_p</tt>.
|
29
|
-
# If the annealing process has been successful this should be a good approximation
|
28
|
+
# On exit the best result achieved during the search is placed in <tt>x0_p</tt>.
|
29
|
+
# If the annealing process has been successful this should be a good approximation
|
30
30
|
# to the optimal point in the space.
|
31
31
|
#
|
32
|
-
# If the function <tt>printer</tt> is not <tt>nil</tt>, a debugging log will be printed
|
32
|
+
# If the function <tt>printer</tt> is not <tt>nil</tt>, a debugging log will be printed
|
33
33
|
# to stdout with the following columns:
|
34
34
|
# number_of_iterations temperature x x-(x0_p) efunc(x)
|
35
|
-
# and the output of <tt>printer</tt> itself. If <tt>printer</tt> is <tt>nil</tt>
|
35
|
+
# and the output of <tt>printer</tt> itself. If <tt>printer</tt> is <tt>nil</tt>
|
36
36
|
# then no information is printed.
|
37
37
|
#
|
38
|
-
# ==
|
38
|
+
# == Example
|
39
39
|
#
|
40
40
|
# #!/usr/bin/env ruby
|
41
41
|
# require("gsl")
|
@@ -81,9 +81,9 @@
|
|
81
81
|
# Siman::solve(rng, x, efunc, step, metric, nil, params)
|
82
82
|
# p x
|
83
83
|
#
|
84
|
-
# {prev}[link:
|
85
|
-
# {next}[link:
|
84
|
+
# {prev}[link:monte_rdoc.html]
|
85
|
+
# {next}[link:odeiv_rdoc.html]
|
86
86
|
#
|
87
|
-
# {Reference index}[link:
|
87
|
+
# {Reference index}[link:ref_rdoc.html]
|
88
88
|
# {top}[link:index.html]
|
89
89
|
#
|
data/rdoc/sort.rdoc
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
#
|
2
2
|
# = Sorting
|
3
3
|
# Contents:
|
4
|
-
# 1. {Heapsort of vectors}[link:
|
5
|
-
# 1. {Sorting vectors}[link:
|
6
|
-
# 1. {Selecting the k smallest or largest elements}[link:
|
4
|
+
# 1. {Heapsort of vectors}[link:sort_rdoc.html#label-Heapsort]
|
5
|
+
# 1. {Sorting vectors}[link:sort_rdoc.html#label-Sorting+vectors]
|
6
|
+
# 1. {Selecting the k smallest or largest elements}[link:sort_rdoc.html#label-Selecting+the+k+smallest+or+largest+elements]
|
7
7
|
#
|
8
|
-
# ==
|
8
|
+
# == Heapsort
|
9
9
|
#
|
10
10
|
# ---
|
11
11
|
# * GSL::Vector#heapsort
|
12
12
|
# * GSL::Vector::Complex#heapsort
|
13
13
|
# * GSL.heapsort(v)
|
14
14
|
#
|
15
|
-
# These method sort the elements of the vector <tt>self</tt>
|
15
|
+
# These method sort the elements of the vector <tt>self</tt>
|
16
16
|
# using the comparison function given by a block, and return the result
|
17
17
|
# as a new vector object. The vector <tt>self</tt> is not changed.
|
18
18
|
#
|
@@ -34,61 +34,61 @@
|
|
34
34
|
# * GSL::Vector::Complex#heapsort_index
|
35
35
|
# * GSL.heapsort_index(v)
|
36
36
|
#
|
37
|
-
# These method indirectly sort the elements of the vector <tt>self</tt>
|
38
|
-
# using the comparison
|
37
|
+
# These method indirectly sort the elements of the vector <tt>self</tt>
|
38
|
+
# using the comparison
|
39
39
|
# function given by a block, and return the result
|
40
40
|
# as a permutation object. The vector itself is not changed.
|
41
|
-
#
|
42
|
-
# ==
|
41
|
+
#
|
42
|
+
# == Sorting vectors
|
43
43
|
# ---
|
44
44
|
# * GSL::Vector#sort!
|
45
45
|
#
|
46
|
-
# This method sorts the elements of the vector <tt>self</tt> into
|
46
|
+
# This method sorts the elements of the vector <tt>self</tt> into
|
47
47
|
# ascending numerical order. The vector itself is changed.
|
48
48
|
#
|
49
49
|
# ---
|
50
50
|
# * GSL::Vector#sort
|
51
51
|
#
|
52
|
-
# This returns a new vector whose elements are sorted into ascending
|
52
|
+
# This returns a new vector whose elements are sorted into ascending
|
53
53
|
# numerical order. The vector <tt>self</tt> is not changed.
|
54
54
|
#
|
55
55
|
# ---
|
56
56
|
# * GSL::Vector#sort_index
|
57
57
|
#
|
58
|
-
# This method indirectly sorts the elements of the vector <tt>self</tt>
|
59
|
-
# into ascending order,
|
60
|
-
# and returns the result as a <tt>GSL::Permutation</tt> object.
|
61
|
-
# The elements of the returned permutation give the index of the vector
|
58
|
+
# This method indirectly sorts the elements of the vector <tt>self</tt>
|
59
|
+
# into ascending order,
|
60
|
+
# and returns the result as a <tt>GSL::Permutation</tt> object.
|
61
|
+
# The elements of the returned permutation give the index of the vector
|
62
62
|
# element which would
|
63
|
-
# have been stored in that position if the vector had been sorted in place.
|
64
|
-
# The first element of the permutation gives the index of the least element
|
65
|
-
# in <tt>self</tt>, and the last element of the permutation gives the index
|
66
|
-
# of the greatest element in
|
63
|
+
# have been stored in that position if the vector had been sorted in place.
|
64
|
+
# The first element of the permutation gives the index of the least element
|
65
|
+
# in <tt>self</tt>, and the last element of the permutation gives the index
|
66
|
+
# of the greatest element in
|
67
67
|
# <tt>self</tt>. The vector <tt>self</tt> is not changed.
|
68
68
|
#
|
69
|
-
# ==
|
69
|
+
# == Selecting the k smallest or largest elements
|
70
70
|
# ---
|
71
71
|
# * GSL::Vector#sort_smallest(k)
|
72
72
|
# * GSL::Vector#sort_largest(k)
|
73
73
|
#
|
74
|
-
# These functions return a new vector of the <tt>k</tt> smallest or
|
75
|
-
# largest elements of the vector <tt>self</tt>.
|
76
|
-
# The argument <tt>k</tt> must be less than or equal to the length
|
77
|
-
# of the vector <tt>self</tt>.
|
74
|
+
# These functions return a new vector of the <tt>k</tt> smallest or
|
75
|
+
# largest elements of the vector <tt>self</tt>.
|
76
|
+
# The argument <tt>k</tt> must be less than or equal to the length
|
77
|
+
# of the vector <tt>self</tt>.
|
78
78
|
#
|
79
79
|
# ---
|
80
80
|
# * GSL::Vector#sort_smallest_index(k)
|
81
81
|
# * GSL::Vector#sort_largest_index(k)
|
82
82
|
#
|
83
|
-
# These functions return a new <tt>GSL::Permutation</tt> object of the indices of the
|
84
|
-
# <tt>k</tt> smallest or largest elements of the vector <tt>self</tt>.
|
83
|
+
# These functions return a new <tt>GSL::Permutation</tt> object of the indices of the
|
84
|
+
# <tt>k</tt> smallest or largest elements of the vector <tt>self</tt>.
|
85
85
|
# <tt>k</tt> must be less than or equal to the length of the vector.
|
86
86
|
#
|
87
87
|
#
|
88
|
-
# {prev}[link:
|
89
|
-
# {next}[link:
|
88
|
+
# {prev}[link:combi_rdoc.html]
|
89
|
+
# {next}[link:blas_rdoc.html]
|
90
90
|
#
|
91
|
-
# {Reference index}[link:
|
91
|
+
# {Reference index}[link:ref_rdoc.html]
|
92
92
|
# {top}[link:index.html]
|
93
93
|
#
|
94
94
|
#
|
data/rdoc/start.rdoc
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
#
|
2
2
|
# = Getting started
|
3
3
|
#
|
4
|
-
# The GNU Scientific Library ({GSL}[
|
5
|
-
# is a collection of routines for numerical computing.
|
6
|
-
# The routines have been written from scratch in C, and present a modern Applications
|
7
|
-
# Programming Interface (API) for C programmers, allowing wrappers to be
|
8
|
-
# written for very high level languages. The source code is distributed
|
4
|
+
# The GNU Scientific Library ({GSL}[https://gnu.org/software/gsl/])
|
5
|
+
# is a collection of routines for numerical computing.
|
6
|
+
# The routines have been written from scratch in C, and present a modern Applications
|
7
|
+
# Programming Interface (API) for C programmers, allowing wrappers to be
|
8
|
+
# written for very high level languages. The source code is distributed
|
9
9
|
# under the GNU General Public License.
|
10
10
|
#
|
11
|
-
# The {Ruby/GSL}[
|
12
|
-
#
|
13
|
-
# See {here}[link:
|
11
|
+
# The {Ruby/GSL}[https://blackwinter.github.com/rb-gsl] is Ruby
|
12
|
+
# bindings for GSL. This provides higher-level interfaces to the GSL functions.
|
13
|
+
# See {here}[link:use_rdoc.html] for installation. To use the library , just put at the head of your scripts <tt>require("gsl")</tt>, or type it from the command line of <tt>irb</tt>.
|
14
14
|
#
|
15
15
|
#
|
16
16
|
#
|
data/rdoc/stats.rdoc
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
#
|
2
2
|
# = Statistics
|
3
|
-
# 1. {Mean, Standard Deviation and Variance}[link:
|
4
|
-
# 1. {Absolute deviation}[link:
|
5
|
-
# 1. {Higher moments (skewness and kurtosis)}[link:
|
6
|
-
# 1. {Autocorrelation}[link:
|
7
|
-
# 1. {Covariance}[link:
|
8
|
-
# 1. {Correlation}[link:
|
9
|
-
# 1. {Weighted samples}[link:
|
10
|
-
# 1. {Maximum and minimum values}[link:
|
11
|
-
# 1. {Median and percentiles}[link:
|
12
|
-
# 1. {Examples}[link:
|
3
|
+
# 1. {Mean, Standard Deviation and Variance}[link:stats_rdoc.html#label-Mean%2C+Standard+Deviation+and+Variance]
|
4
|
+
# 1. {Absolute deviation}[link:stats_rdoc.html#label-Absolute+deviation]
|
5
|
+
# 1. {Higher moments (skewness and kurtosis)}[link:stats_rdoc.html#label-Higher+moments+%28skewness+and+kurtosis%29]
|
6
|
+
# 1. {Autocorrelation}[link:stats_rdoc.html#label-Autocorrelation]
|
7
|
+
# 1. {Covariance}[link:stats_rdoc.html#label-Covariance]
|
8
|
+
# 1. {Correlation}[link:stats_rdoc.html#label-Correlation]
|
9
|
+
# 1. {Weighted samples}[link:stats_rdoc.html#label-Weighted+samples]
|
10
|
+
# 1. {Maximum and minimum values}[link:stats_rdoc.html#label-Maximum+and+Minimum+values]
|
11
|
+
# 1. {Median and percentiles}[link:stats_rdoc.html#label-Median+and+Percentiles]
|
12
|
+
# 1. {Examples}[link:stats_rdoc.html#label-Example]
|
13
13
|
#
|
14
|
-
# ==
|
14
|
+
# == Mean, Standard Deviation and Variance
|
15
15
|
#
|
16
16
|
# ---
|
17
17
|
# * GSL::Stats::mean(v)
|
@@ -23,7 +23,7 @@
|
|
23
23
|
# >> require("gsl")
|
24
24
|
# => true
|
25
25
|
# >> v = Vector[1..7]
|
26
|
-
# => GSL::Vector:
|
26
|
+
# => GSL::Vector:
|
27
27
|
# [ 1.000e+00 2.000e+00 3.000e+00 4.000e+00 5.000e+00 6.000e+00 7.000e+00 ]
|
28
28
|
# >> v.mean
|
29
29
|
# => 4.0
|
@@ -43,27 +43,27 @@
|
|
43
43
|
#
|
44
44
|
# ---
|
45
45
|
# * GSL::Stats::variance_m(v[, mean])
|
46
|
-
# * GSL::Vector#variance_m([mean])
|
46
|
+
# * \GSL::Vector#variance_m([mean])
|
47
47
|
#
|
48
48
|
# Variance of <tt>v</tt> relative to the given value of <tt>mean</tt>.
|
49
49
|
#
|
50
50
|
# ---
|
51
51
|
# * GSL::Stats::sd(v[, mean])
|
52
|
-
# * GSL::Vector#sd([mean])
|
52
|
+
# * \GSL::Vector#sd([mean])
|
53
53
|
#
|
54
54
|
# Standard deviation.
|
55
55
|
#
|
56
56
|
# ---
|
57
57
|
# * GSL::Stats::tss(v[, mean])
|
58
|
-
# * GSL::Vector#tss([mean])
|
58
|
+
# * \GSL::Vector#tss([mean])
|
59
59
|
#
|
60
|
-
# (GSL-1.11 or later) These methods return the total sum of squares (TSS) of data about the mean.
|
60
|
+
# (GSL-1.11 or later) These methods return the total sum of squares (TSS) of data about the mean.
|
61
61
|
#
|
62
62
|
# ---
|
63
63
|
# * GSL::Stats::variance_with_fixed_mean(v, mean)
|
64
64
|
# * GSL::Vector#variance_with_fixed_mean(mean)
|
65
65
|
#
|
66
|
-
# Unbiased estimate of the variance of <tt>v</tt> when the population mean
|
66
|
+
# Unbiased estimate of the variance of <tt>v</tt> when the population mean
|
67
67
|
# <tt>mean</tt> of the underlying distribution is known <tt>a priori</tt>.
|
68
68
|
#
|
69
69
|
# ---
|
@@ -72,51 +72,51 @@
|
|
72
72
|
# * GSL::Stats::sd_with_fixed_mean(v, mean)
|
73
73
|
# * GSL::Vector#sd_with_fixed_mean(mean)
|
74
74
|
#
|
75
|
-
# Unbiased estimate of the variance of <tt>v</tt> when the population mean
|
75
|
+
# Unbiased estimate of the variance of <tt>v</tt> when the population mean
|
76
76
|
# <tt>mean</tt> of the underlying distribution is known <tt>a priori</tt>.
|
77
77
|
#
|
78
|
-
# ==
|
78
|
+
# == Absolute deviation
|
79
79
|
# ---
|
80
80
|
# * GSL::Stats::absdev(v[, mean])
|
81
|
-
# * GSL::Vector#absdev([mean])
|
81
|
+
# * \GSL::Vector#absdev([mean])
|
82
82
|
#
|
83
83
|
# Compute the absolute deviation (from the mean <tt>mean</tt> if given).
|
84
84
|
#
|
85
|
-
# ==
|
85
|
+
# == Higher moments (skewness and kurtosis)
|
86
86
|
#
|
87
87
|
# ---
|
88
88
|
# * GSL::Stats::skew(v[, mean, sd])
|
89
|
-
# * GSL::Vector#skew([mean, sd])
|
89
|
+
# * \GSL::Vector#skew([mean, sd])
|
90
90
|
#
|
91
91
|
# Skewness
|
92
92
|
#
|
93
93
|
# ---
|
94
94
|
# * GSL::Stats::kurtosis(v[, mean, sd])
|
95
|
-
# * GSL::Vector#kurtosis([mean, sd])
|
95
|
+
# * \GSL::Vector#kurtosis([mean, sd])
|
96
96
|
#
|
97
97
|
# Kurtosis
|
98
98
|
#
|
99
|
-
# ==
|
99
|
+
# == Autocorrelation
|
100
100
|
# ---
|
101
101
|
# * GSL::Stats::lag1_autocorrelation(v[, mean])
|
102
|
-
# * GSL::Vector#lag1_autocorrelation([mean])
|
102
|
+
# * \GSL::Vector#lag1_autocorrelation([mean])
|
103
103
|
#
|
104
104
|
# The lag-1 autocorrelation
|
105
105
|
#
|
106
|
-
# ==
|
106
|
+
# == Covariance
|
107
107
|
# ---
|
108
108
|
# * GSL::Stats::covariance(v1, v2)
|
109
109
|
# * GSL::Stats::covariance_m(v1, v2, mean1, mean2)
|
110
110
|
#
|
111
111
|
# Covariance of vectors <tt>v1, v2</tt>.
|
112
112
|
#
|
113
|
-
# ==
|
113
|
+
# == Correlation
|
114
114
|
# ---
|
115
115
|
# * GSL::Stats::correlation(v1, v2)
|
116
116
|
#
|
117
117
|
# This efficiently computes the Pearson correlation coefficient between the vectors <tt>v1, v2</tt>. (>= GSL-1.10)
|
118
118
|
#
|
119
|
-
# ==
|
119
|
+
# == Weighted samples
|
120
120
|
# ---
|
121
121
|
# * GSL::Vector#wmean(w)
|
122
122
|
# * GSL::Vector#wvariance(w)
|
@@ -126,7 +126,7 @@
|
|
126
126
|
# * GSL::Vector#wkurtosis(w)
|
127
127
|
#
|
128
128
|
#
|
129
|
-
# ==
|
129
|
+
# == Maximum and Minimum values
|
130
130
|
# ---
|
131
131
|
# * GSL::Stats::max(data)
|
132
132
|
# * GSL::Vector#max
|
@@ -149,49 +149,49 @@
|
|
149
149
|
# * GSL::Stats::max_index(data)
|
150
150
|
# * GSL::Vector#max_index
|
151
151
|
#
|
152
|
-
# Return the index of the maximum value in <tt>data</tt>.
|
153
|
-
# The maximum value is defined as the value of the element x_i
|
154
|
-
# which satisfies x_i >= x_j for all j.
|
155
|
-
# When there are several equal maximum elements then the first one is chosen.
|
152
|
+
# Return the index of the maximum value in <tt>data</tt>.
|
153
|
+
# The maximum value is defined as the value of the element x_i
|
154
|
+
# which satisfies x_i >= x_j for all j.
|
155
|
+
# When there are several equal maximum elements then the first one is chosen.
|
156
156
|
# ---
|
157
157
|
# * GSL::Stats::min_index(data)
|
158
158
|
# * GSL::Vector#min_index
|
159
159
|
#
|
160
|
-
# Returns the index of the minimum value in <tt>data</tt>.
|
161
|
-
# The minimum value is defined as the value of the element x_i
|
162
|
-
# which satisfies x_i >= x_j for all j.
|
163
|
-
# When there are several equal minimum elements then the first one is
|
164
|
-
# chosen.
|
160
|
+
# Returns the index of the minimum value in <tt>data</tt>.
|
161
|
+
# The minimum value is defined as the value of the element x_i
|
162
|
+
# which satisfies x_i >= x_j for all j.
|
163
|
+
# When there are several equal minimum elements then the first one is
|
164
|
+
# chosen.
|
165
165
|
#
|
166
166
|
# ---
|
167
167
|
# * GSL::Stats::minmax_index(data)
|
168
168
|
# * GSL::Vector#minmax_index
|
169
169
|
#
|
170
|
-
# Return the indexes of the minimum and maximum values in <tt>data</tt>
|
171
|
-
# in a single pass.
|
170
|
+
# Return the indexes of the minimum and maximum values in <tt>data</tt>
|
171
|
+
# in a single pass.
|
172
172
|
#
|
173
173
|
#
|
174
|
-
# ==
|
174
|
+
# == Median and Percentiles
|
175
175
|
#
|
176
176
|
# ---
|
177
177
|
# * GSL::Stats::median_from_sorted_data(v)
|
178
178
|
# * GSL::Vector#median_from_sorted_data
|
179
179
|
#
|
180
|
-
# Return the median value. The elements of the data must be
|
181
|
-
# in ascending numerical order. There are no checks to see whether
|
182
|
-
# the data are sorted, so the method <tt>GSL::Vector#sort</tt>
|
180
|
+
# Return the median value. The elements of the data must be
|
181
|
+
# in ascending numerical order. There are no checks to see whether
|
182
|
+
# the data are sorted, so the method <tt>GSL::Vector#sort</tt>
|
183
183
|
# should always be used first.
|
184
184
|
#
|
185
185
|
# ---
|
186
186
|
# * GSL::Stats::quantile_from_sorted_data(v)
|
187
187
|
# * GSL::Vector#quantile_from_sorted_data
|
188
188
|
#
|
189
|
-
# Return the quantile value. The elements of the data must be
|
190
|
-
# in ascending numerical order. There are no checks to see whether
|
191
|
-
# the data are sorted, so the method <tt>GSL::Vector#sort</tt>
|
189
|
+
# Return the quantile value. The elements of the data must be
|
190
|
+
# in ascending numerical order. There are no checks to see whether
|
191
|
+
# the data are sorted, so the method <tt>GSL::Vector#sort</tt>
|
192
192
|
# should always be used first.
|
193
193
|
#
|
194
|
-
# ==
|
194
|
+
# == Example
|
195
195
|
#
|
196
196
|
# #!/usr/bin/env ruby
|
197
197
|
# require 'gsl'
|
@@ -211,9 +211,9 @@
|
|
211
211
|
# printf("The largest value is %g\n", largest);
|
212
212
|
# printf("The smallest value is %g\n", smallest);
|
213
213
|
#
|
214
|
-
# {prev}[link:
|
215
|
-
# {next}[link:
|
214
|
+
# {prev}[link:randist_rdoc.html]
|
215
|
+
# {next}[link:hist_rdoc.html]
|
216
216
|
#
|
217
|
-
# {Reference index}[link:
|
217
|
+
# {Reference index}[link:ref_rdoc.html]
|
218
218
|
# {top}[link:index.html]
|
219
219
|
#
|
data/rdoc/sum.rdoc
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
# = Series Acceleration
|
3
3
|
# In Ruby/GSL, series acceleration functions are provided as singleton methods
|
4
4
|
# for the <tt>GSL::Sum::Levin_u, Levin_utrunc</tt> classes, and methods of
|
5
|
-
# an object of the {GSL::Vector}[link:
|
5
|
+
# an object of the {GSL::Vector}[link:vector_rdoc.html] class.
|
6
6
|
#
|
7
|
-
# ==
|
7
|
+
# == Modules and classes
|
8
8
|
# * GSL
|
9
9
|
# * Sum (Module)
|
10
10
|
# * Levin_u (Class)
|
11
11
|
# * Levin_utrunc (Class)
|
12
12
|
#
|
13
|
-
# ==
|
13
|
+
# == Methods
|
14
14
|
#
|
15
15
|
# ---
|
16
16
|
# * GSL::Sum::Levin_u.alloc(size)
|
@@ -20,16 +20,16 @@
|
|
20
20
|
# ---
|
21
21
|
# * GSL::Sum::Levin_u.accel(v)
|
22
22
|
#
|
23
|
-
# This method takes the terms of a series in vector <tt>v</tt> and computes
|
23
|
+
# This method takes the terms of a series in vector <tt>v</tt> and computes
|
24
24
|
# the extrapolated limit of the series using a Levin u-transform. This returns
|
25
25
|
# an array of <tt>[sum, abserr, sum_plain, terms_used]</tt>,
|
26
|
-
# where <tt>sum</tt> is the extrapolated sum, <tt>abserr</tt> is an estimate of the
|
26
|
+
# where <tt>sum</tt> is the extrapolated sum, <tt>abserr</tt> is an estimate of the
|
27
27
|
# absolute error, and <tt>sum_plain</tt> is the actual term-by-term sum.
|
28
28
|
#
|
29
29
|
# ---
|
30
30
|
# * GSL::Sum::Levin_utrunc.accel(v)
|
31
31
|
#
|
32
|
-
# This method takes the terms of a series in vector <tt>v</tt> and computes
|
32
|
+
# This method takes the terms of a series in vector <tt>v</tt> and computes
|
33
33
|
# the extrapolated limit of the series using a Levin u-transform. This returns
|
34
34
|
# an array of <tt>[sum, abserr_trunc, sum_plain, terms_used]</tt>.
|
35
35
|
#
|
@@ -48,17 +48,17 @@
|
|
48
48
|
# * GSL::Vector#sum_accel
|
49
49
|
# * GSL::Vector#sum
|
50
50
|
#
|
51
|
-
# These calculate the "extrapolated" sum of the terms contained in a
|
52
|
-
# GSL::Vector object, using a Levin u-transform. The returned values is a
|
51
|
+
# These calculate the "extrapolated" sum of the terms contained in a
|
52
|
+
# GSL::Vector object, using a Levin u-transform. The returned values is a
|
53
53
|
# Ruby array with 4 elements, as [<tt>sum_accel, err, sum_plain, terms_used</tt>],
|
54
54
|
# where <tt>sum_accel</tt> is the extraplated sum, <tt>err</tt> is the absolute error,
|
55
55
|
# <tt>sum_plain</tt> is the term-by-term sum, and <tt>terms_used</tt> is the number of
|
56
56
|
# terms actually used in the calculation.
|
57
57
|
#
|
58
|
-
# {prev}[link:
|
59
|
-
# {next}[link:
|
58
|
+
# {prev}[link:cheb_rdoc.html]
|
59
|
+
# {next}[link:dht_rdoc.html]
|
60
60
|
#
|
61
|
-
# {Reference index}[link:
|
61
|
+
# {Reference index}[link:ref_rdoc.html]
|
62
62
|
# {top}[link:index.html]
|
63
63
|
#
|
64
64
|
#
|