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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cd1daf4ebeac19da26e8f07a1a7f9c98a11f47a
|
4
|
+
data.tar.gz: 94b8324c961064d0dc8d41969f0658fcff3a4b35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 979c8f99f5f3f2a6efa2713fcc9180dd080b671aecabc8a4cb91df4d22b3a3c6559fbc238bd8a746f4ba79d5440c33b21158019c1c1004530f2656b62c7e2170
|
7
|
+
data.tar.gz: 6dc5252a9bc46a377520bead0a4287a5e5984689afe56909c64c441f282561f2f0eccd15826933039be04a9500f142a646f941f91689207b20804f329a3a9b7a
|
data/ChangeLog
CHANGED
data/README
CHANGED
@@ -4,11 +4,11 @@ Ruby/GSL, a ruby interface to GSL (GNU Scientific library)
|
|
4
4
|
|
5
5
|
== Installation
|
6
6
|
|
7
|
-
See http://blackwinter.github.
|
7
|
+
See http://blackwinter.github.com/rb-gsl.
|
8
8
|
|
9
9
|
== Reference
|
10
10
|
|
11
|
-
See http://blackwinter.github.
|
11
|
+
See http://blackwinter.github.com/rb-gsl/rdoc/ref_rdoc.
|
12
12
|
|
13
13
|
== Licence
|
14
14
|
|
data/Rakefile
CHANGED
@@ -17,7 +17,6 @@ begin
|
|
17
17
|
:homepage => :blackwinter,
|
18
18
|
:dependencies => [['narray', '>= 0.5.9']],
|
19
19
|
:requirements => ['GSL (http://www.gnu.org/software/gsl/)'],
|
20
|
-
:require_paths => %w[lib lib/gsl lib/ool ext],
|
21
20
|
|
22
21
|
:extra_files => FileList['examples/**/*', 'rdoc/*'].to_a,
|
23
22
|
|
@@ -28,8 +27,8 @@ begin
|
|
28
27
|
:rdoc => {
|
29
28
|
:title => 'Ruby/GSL{version: (v%s)}',
|
30
29
|
:rdoc_files => FileList['rdoc/*'].to_a,
|
31
|
-
:
|
32
|
-
:
|
30
|
+
:main => 'index.rdoc',
|
31
|
+
:root => 'rdoc'
|
33
32
|
},
|
34
33
|
:test => {
|
35
34
|
:libs => %w[lib test]
|
data/lib/gsl/version.rb
CHANGED
data/rdoc/alf.rdoc
CHANGED
@@ -5,18 +5,18 @@
|
|
5
5
|
#
|
6
6
|
# The class and method descriptions below are based on references from the document of ALF (alf-1.0/doc/alf.texi) by P.Alken.
|
7
7
|
#
|
8
|
-
# ==
|
8
|
+
# == Module structure
|
9
9
|
# * GSL::ALF (module)
|
10
10
|
# * GSL::ALF::Workspace (Class)
|
11
11
|
#
|
12
|
-
# ==
|
12
|
+
# == Creating ALF workspace
|
13
13
|
# ---
|
14
14
|
# * GSL::ALF::Workspace.alloc(lmax)
|
15
15
|
# * GSL::ALF.alloc(lmax)
|
16
16
|
#
|
17
17
|
# Creates a workspace for computing associated Legendre polynomials (ALFs). The maximum ALF degree is specified by lmax. The size of this workspace is O(lmax).
|
18
18
|
#
|
19
|
-
# ==
|
19
|
+
# == Methods
|
20
20
|
# ---
|
21
21
|
# * GSL::ALF::Workspace#params(csphase, cnorm, norm)
|
22
22
|
#
|
@@ -49,7 +49,7 @@
|
|
49
49
|
# must have enough length to store all the values for the polynomial
|
50
50
|
# P_l^m(x), and the length required can be known using
|
51
51
|
# <tt>ALF::array_size(lmax)</tt>. If a vector is not given, a new vector is
|
52
|
-
# created and returned.
|
52
|
+
# created and returned.
|
53
53
|
#
|
54
54
|
# The indices of <tt>result</tt> (and <tt>deriv</tt> corresponding to the
|
55
55
|
# associated Legendre function of degree <tt>l</tt> and order <tt>m</tt> can
|
@@ -61,7 +61,7 @@
|
|
61
61
|
# * GSL::ALF::Workspace#Plm_deriv_array(lmax, x, result, deriv)
|
62
62
|
#
|
63
63
|
# Compute all associated Legendre polynomials P_l^m(x) and their first
|
64
|
-
# derivatives dP_l^m(x)/dx for 0 <= l <= lmax, 0 <= m <= l.
|
64
|
+
# derivatives dP_l^m(x)/dx for 0 <= l <= lmax, 0 <= m <= l.
|
65
65
|
#
|
66
66
|
# ---
|
67
67
|
# * GSL::ALF::array_size(lmax)
|
data/rdoc/blas.rdoc
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
#
|
2
2
|
# = BLAS Support
|
3
3
|
# The following is the list of the methods defined in <tt>GSL::Blas</tt> module.
|
4
|
-
# See {GSL reference}[
|
4
|
+
# See {GSL reference}[https://gnu.org/software/gsl/manual/gsl-ref_12.html#SEC212] for details.
|
5
5
|
#
|
6
|
-
# ==
|
6
|
+
# == Level 1
|
7
7
|
# ---
|
8
8
|
# * GSL::Blas::ddot(x, y)
|
9
9
|
# * GSL::Vector#blas_ddot(y)
|
@@ -134,7 +134,7 @@
|
|
134
134
|
# * GSL::Blas::drotm!(x, y, p)
|
135
135
|
#
|
136
136
|
#
|
137
|
-
# ==
|
137
|
+
# == Level 2
|
138
138
|
# ---
|
139
139
|
# * GSL::Blas::dgemv(trans, a, A, x, b, y)
|
140
140
|
# * GSL::Blas::dgemv!(trans, a, A, x, b, y)
|
@@ -186,7 +186,7 @@
|
|
186
186
|
# * GSL::Blas::zher2!(uplo, a, x, y, A)
|
187
187
|
#
|
188
188
|
#
|
189
|
-
# ==
|
189
|
+
# == Level 3
|
190
190
|
# ---
|
191
191
|
# * GSL::Blas::dgemm(transA, transB, alpha, A, B, beta, C)
|
192
192
|
# * GSL::Blas::dgemm(A, B)
|
@@ -234,7 +234,7 @@
|
|
234
234
|
# * GSL::Blas::zher2k(uplo, trans, diag, alpha, A, B, beta, C)
|
235
235
|
#
|
236
236
|
#
|
237
|
-
# ==
|
237
|
+
# == Constants
|
238
238
|
# ---
|
239
239
|
# * GSL::Blas::CblasRowMajor
|
240
240
|
# * GSL::Blas::RowMajor
|
@@ -260,10 +260,10 @@
|
|
260
260
|
# * GSL::Blas::Right
|
261
261
|
#
|
262
262
|
#
|
263
|
-
# {prev}[link:
|
264
|
-
# {next}[link:
|
263
|
+
# {prev}[link:sort_rdoc.html]
|
264
|
+
# {next}[link:linalg_rdoc.html]
|
265
265
|
#
|
266
|
-
# {Reference index}[link:
|
266
|
+
# {Reference index}[link:ref_rdoc.html]
|
267
267
|
# {top}[link:index.html]
|
268
268
|
#
|
269
269
|
#
|
data/rdoc/bspline.rdoc
CHANGED
@@ -2,24 +2,24 @@
|
|
2
2
|
# = Basis Splines
|
3
3
|
# This chapter describes functions for the computation of smoothing basis splines (B-splines). This is only for GSL-1.9 or later.
|
4
4
|
#
|
5
|
-
# 1. {Overview}[link:
|
6
|
-
# 1. {Initializing the B-splines solver}[link:
|
7
|
-
# 1. {Constructing the knots vector}[link:
|
8
|
-
# 1. {Evaluation of B-splines}[link:
|
5
|
+
# 1. {Overview}[link:bspline_rdoc.html#label-Overview]
|
6
|
+
# 1. {Initializing the B-splines solver}[link:bspline_rdoc.html#label-Initializing+the+B-splines+solver]
|
7
|
+
# 1. {Constructing the knots vector}[link:bspline_rdoc.html#label-Constructing+the+knots+vector]
|
8
|
+
# 1. {Evaluation of B-splines}[link:bspline_rdoc.html#label-Evaluation+of+B-splines]
|
9
9
|
#
|
10
|
-
# ==
|
10
|
+
# == Overview
|
11
11
|
#
|
12
|
-
# B-splines are commonly used as basis functions to fit smoothing curves to large data sets. To do this, the abscissa axis is broken up into some number of intervals, where the endpoints of each interval are called breakpoints. These breakpoints are then converted to knots by imposing various continuity and smoothness conditions at each interface. Given a nondecreasing knot vector t = \{t_0, t_1, \dots, t_{n+k-1\, the n basis splines of order k are defined by for i = 0, \dots, n-1. The common case of cubic B-splines is given by k = 4. The above recurrence relation can be evaluated in a numerically stable way by the de Boor algorithm.
|
12
|
+
# B-splines are commonly used as basis functions to fit smoothing curves to large data sets. To do this, the abscissa axis is broken up into some number of intervals, where the endpoints of each interval are called breakpoints. These breakpoints are then converted to knots by imposing various continuity and smoothness conditions at each interface. Given a nondecreasing knot vector t = \{t_0, t_1, \dots, t_{n+k-1\, the n basis splines of order k are defined by for i = 0, \dots, n-1. The common case of cubic B-splines is given by k = 4. The above recurrence relation can be evaluated in a numerically stable way by the de Boor algorithm.
|
13
13
|
#
|
14
|
-
# If we define appropriate knots on an interval [a,b] then the B-spline basis functions form a complete set on that interval. Therefore we can expand a smoothing function as given enough (x_j, f(x_j)) data pairs. The c_i can be readily obtained from a least-squares fit.
|
14
|
+
# If we define appropriate knots on an interval [a,b] then the B-spline basis functions form a complete set on that interval. Therefore we can expand a smoothing function as given enough (x_j, f(x_j)) data pairs. The c_i can be readily obtained from a least-squares fit.
|
15
15
|
#
|
16
|
-
# ==
|
16
|
+
# == Initializing the B-splines solver
|
17
17
|
# ---
|
18
18
|
# * GSL::BSpline.alloc(k, nbreak)
|
19
19
|
#
|
20
|
-
# This method creates a workspace for computing B-splines of order <tt>k</tt>. The number of breakpoints is given by <tt>nbreak</tt>. This leads to <tt>n = nbreak + k - 2</tt> basis functions. Cubic B-splines are specified by <tt>k = 4</tt>. The size of the workspace is <tt>O(5k + nbreak)</tt>.
|
20
|
+
# This method creates a workspace for computing B-splines of order <tt>k</tt>. The number of breakpoints is given by <tt>nbreak</tt>. This leads to <tt>n = nbreak + k - 2</tt> basis functions. Cubic B-splines are specified by <tt>k = 4</tt>. The size of the workspace is <tt>O(5k + nbreak)</tt>.
|
21
21
|
#
|
22
|
-
# ==
|
22
|
+
# == Constructing the knots vector
|
23
23
|
# ---
|
24
24
|
# * GSL::BSpline#knots(breakpts)
|
25
25
|
#
|
@@ -27,16 +27,16 @@
|
|
27
27
|
# ---
|
28
28
|
# * GSL::BSpline#knots_uniform(a, b)
|
29
29
|
#
|
30
|
-
# This method assumes uniformly spaced breakpoints on [<tt>a,b</tt>] and constructs the corresponding knot vector using the previously specified <tt>nbreak</tt> parameter.
|
31
|
-
# ==
|
30
|
+
# This method assumes uniformly spaced breakpoints on [<tt>a,b</tt>] and constructs the corresponding knot vector using the previously specified <tt>nbreak</tt> parameter.
|
31
|
+
# == Evaluation of B-splines
|
32
32
|
# ---
|
33
33
|
# * GSL::BSpline#eval(x[, B])
|
34
34
|
#
|
35
|
-
# This method evaluates all B-spline basis functions at the position <tt>x</tt> and stores them in <tt>B</tt> (if given), so that the ith element of <tt>B</tt> is <tt>B_i(x)</tt>. <tt>B</tt> must be of length <tt>n = nbreak + k - 2</tt>. If <tt>B</tt> is not given, a newly created vector is returned.It is far more efficient to compute all of the basis functions at once than to compute them individually, due to the nature of the defining recurrence relation.
|
35
|
+
# This method evaluates all B-spline basis functions at the position <tt>x</tt> and stores them in <tt>B</tt> (if given), so that the ith element of <tt>B</tt> is <tt>B_i(x)</tt>. <tt>B</tt> must be of length <tt>n = nbreak + k - 2</tt>. If <tt>B</tt> is not given, a newly created vector is returned.It is far more efficient to compute all of the basis functions at once than to compute them individually, due to the nature of the defining recurrence relation.
|
36
36
|
#
|
37
|
-
# {prev}[link:
|
38
|
-
# {next}[link:
|
37
|
+
# {prev}[link:nonlinearfit_rdoc.html]
|
38
|
+
# {next}[link:const_rdoc.html]
|
39
39
|
#
|
40
|
-
# {Reference index}[link:
|
40
|
+
# {Reference index}[link:ref_rdoc.html]
|
41
41
|
# {top}[link:index.html]
|
42
42
|
#
|
data/rdoc/changes.rdoc
CHANGED
@@ -10,12 +10,7 @@
|
|
10
10
|
# The changes that could break old scripts are described below. They are
|
11
11
|
# followed by highlights of the other enhancements and new features.
|
12
12
|
#
|
13
|
-
#
|
14
|
-
# using Subversion's log command to look at the repository...
|
15
|
-
#
|
16
|
-
# svn log http://rb-gsl.rubyforge.org/svn/trunk/rb-gsl
|
17
|
-
#
|
18
|
-
# == {}[link:index.html"name="1] Backwards incompatibilities introduced in Ruby/GSL 1.11.2
|
13
|
+
# == Backwards incompatibilities introduced in Ruby/GSL 1.11.2
|
19
14
|
#
|
20
15
|
# * FFT interface has been extensively changed.
|
21
16
|
#
|
@@ -39,13 +34,13 @@
|
|
39
34
|
#
|
40
35
|
# * GSL::Complex objects are now immutable.
|
41
36
|
#
|
42
|
-
# ==
|
37
|
+
# == Enhancements and features introduced in Ruby/GSL 1.11.2
|
43
38
|
#
|
44
39
|
# * Now distributed and installable as a Ruby Gem.
|
45
40
|
#
|
46
41
|
# * Allow nil for real and/or imag in GSL::Vector::Complex#set(i,re,im) to NOT
|
47
|
-
# set that component. For example,
|
48
|
-
# 1]
|
42
|
+
# set that component. For example, <tt>z=GSL::Vector::Complex[1]; z[0] = [nil,
|
43
|
+
# 1]</tt> will set \z[0] to \GSL::Complex[0,1].
|
49
44
|
#
|
50
45
|
# * Added GSL::Vector::Complex#to_s method.
|
51
46
|
#
|
data/rdoc/cheb.rdoc
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
#
|
2
2
|
# = Chebyshev Approximations
|
3
|
-
# This chapter describes routines for computing Chebyshev approximations to
|
4
|
-
# univariate functions. A Chebyshev approximation is a truncation of the series
|
5
|
-
# f(x) = \sum c_n T_n(x),
|
6
|
-
# where the Chebyshev polynomials T_n(x) = \cos(n \arccos x)
|
7
|
-
# provide an orthogonal basis of polynomials on the interval [-1,1]
|
8
|
-
# with the weight function 1 / \sqrt{1-x^2}.
|
9
|
-
# The first few Chebyshev polynomials are,
|
10
|
-
# T_0(x) = 1, T_1(x) = x, T_2(x) = 2 x^2 - 1.
|
11
|
-
# For further information see Abramowitz & Stegun, Chapter 22.
|
12
|
-
#
|
13
|
-
# 1. {GSL::Cheb class}[link:
|
14
|
-
# 1. {Chebyshev Series Evaluation}[link:
|
15
|
-
# 1. {Derivatives and Integrals}[link:
|
16
|
-
# 1. {Examples}[link:
|
17
|
-
#
|
18
|
-
# ==
|
3
|
+
# This chapter describes routines for computing Chebyshev approximations to
|
4
|
+
# univariate functions. A Chebyshev approximation is a truncation of the series
|
5
|
+
# f(x) = \sum c_n T_n(x),
|
6
|
+
# where the Chebyshev polynomials T_n(x) = \cos(n \arccos x)
|
7
|
+
# provide an orthogonal basis of polynomials on the interval [-1,1]
|
8
|
+
# with the weight function 1 / \sqrt{1-x^2}.
|
9
|
+
# The first few Chebyshev polynomials are,
|
10
|
+
# T_0(x) = 1, T_1(x) = x, T_2(x) = 2 x^2 - 1.
|
11
|
+
# For further information see Abramowitz & Stegun, Chapter 22.
|
12
|
+
#
|
13
|
+
# 1. {GSL::Cheb class}[link:cheb_rdoc.html#label-Cheb+class]
|
14
|
+
# 1. {Chebyshev Series Evaluation}[link:cheb_rdoc.html#label-Chebyshev+Series+Evaluation]
|
15
|
+
# 1. {Derivatives and Integrals}[link:cheb_rdoc.html#label-Derivatives+and+Integrals]
|
16
|
+
# 1. {Examples}[link:cheb_rdoc.html#label-Example]
|
17
|
+
#
|
18
|
+
# == <tt>Cheb</tt> class
|
19
19
|
#
|
20
20
|
# ---
|
21
|
-
# * GSL::Cheb.alloc(n)
|
21
|
+
# * GSL::Cheb.alloc(n)
|
22
22
|
#
|
23
23
|
# This create an instance of the GSL::Cheb class for a Chebyshev series of order n.
|
24
24
|
#
|
@@ -26,7 +26,7 @@
|
|
26
26
|
# ---
|
27
27
|
# * GSL::Cheb#init(f, a, b)
|
28
28
|
#
|
29
|
-
# This computes the Chebyshev approximation the function <tt>f</tt> over the range (<tt>a,b</tt>) to the previously specified order. Where <tt>f</tt> is a {GSL::Function}[link:
|
29
|
+
# This computes the Chebyshev approximation the function <tt>f</tt> over the range (<tt>a,b</tt>) to the previously specified order. Where <tt>f</tt> is a {GSL::Function}[link:function_rdoc.html] object. The computation of the Chebyshev approximation is an O(n^2) process, and requires <tt>n</tt> function evaluations.
|
30
30
|
#
|
31
31
|
# * ex: Approximate a step function defined in (0, 1) by a Chebyshev series of order 40.
|
32
32
|
# f = GSL::Function.alloc { |x|
|
@@ -40,7 +40,7 @@
|
|
40
40
|
# cs = GSL::Cheb.alloc(40)
|
41
41
|
# cs.init(f, 0, 1)
|
42
42
|
#
|
43
|
-
# ==
|
43
|
+
# == Chebyshev Series Evaluation
|
44
44
|
# ---
|
45
45
|
# * GSL::Cheb#eval(x)
|
46
46
|
#
|
@@ -51,7 +51,7 @@
|
|
51
51
|
#
|
52
52
|
# This evaluates the Chebyshev series at a given point <tt>x</tt>, to (at most) the given order <tt>n</tt>.
|
53
53
|
#
|
54
|
-
# ==
|
54
|
+
# == Derivatives and Integrals
|
55
55
|
#
|
56
56
|
# ---
|
57
57
|
# * GSL::Cheb#calc_deriv()
|
@@ -65,7 +65,7 @@
|
|
65
65
|
#
|
66
66
|
# This computes the integral of the series, and returns a new GSL::Cheb object which contains the computed integral coefficients. The reciever is not changed.
|
67
67
|
#
|
68
|
-
# ==
|
68
|
+
# == Example
|
69
69
|
# #!/usr/bin/env ruby
|
70
70
|
# require("gsl")
|
71
71
|
#
|
@@ -91,9 +91,9 @@
|
|
91
91
|
#
|
92
92
|
# See also the example scripts in <tt>examples/cheb/</tt>.
|
93
93
|
#
|
94
|
-
# {prev}[link:
|
95
|
-
# {next}[link:
|
94
|
+
# {prev}[link:diff_rdoc.html]
|
95
|
+
# {next}[link:sum_rdoc.html]
|
96
96
|
#
|
97
|
-
# {Reference index}[link:
|
97
|
+
# {Reference index}[link:ref_rdoc.html]
|
98
98
|
# {top}[link:index.html]
|
99
99
|
#
|
data/rdoc/cholesky_complex.rdoc
CHANGED
@@ -1,46 +1,46 @@
|
|
1
1
|
#
|
2
2
|
# === Cholesky decomposition (>= GSL-1.10)
|
3
|
-
# A symmetric, positive definite square matrix <tt>A</tt> has
|
4
|
-
# a Cholesky decomposition into a product of a lower triangular matrix
|
3
|
+
# A symmetric, positive definite square matrix <tt>A</tt> has
|
4
|
+
# a Cholesky decomposition into a product of a lower triangular matrix
|
5
5
|
# <tt>L</tt> and its transpose <tt>L^T</tt>.
|
6
|
-
# This is sometimes referred to as taking the square-root of a matrix.
|
7
|
-
# The Cholesky decomposition can only be carried out when all the eigenvalues
|
8
|
-
# of the matrix are positive. This decomposition can be used to convert the
|
9
|
-
# linear system <tt>A x = b</tt> into a pair of triangular systems
|
6
|
+
# This is sometimes referred to as taking the square-root of a matrix.
|
7
|
+
# The Cholesky decomposition can only be carried out when all the eigenvalues
|
8
|
+
# of the matrix are positive. This decomposition can be used to convert the
|
9
|
+
# linear system <tt>A x = b</tt> into a pair of triangular systems
|
10
10
|
# <tt>L y = b, L^T x = y</tt>,
|
11
|
-
# which can be solved by forward and back-substitution.
|
11
|
+
# which can be solved by forward and back-substitution.
|
12
12
|
#
|
13
13
|
# ---
|
14
14
|
# * GSL::Linalg::Complex::Cholesky::decomp(A)
|
15
15
|
# * GSL::Linalg::Complex::cholesky_decomp(A)
|
16
16
|
#
|
17
|
-
# Factorize the positive-definite square matrix <tt>A</tt> into the
|
17
|
+
# Factorize the positive-definite square matrix <tt>A</tt> into the
|
18
18
|
# Cholesky decomposition <tt>A = L L^H</tt>.
|
19
|
-
# On input only the diagonal and lower-triangular part of the matrix <tt>A</tt>
|
19
|
+
# On input only the diagonal and lower-triangular part of the matrix <tt>A</tt>
|
20
20
|
# are needed. The diagonal and lower triangular part of the returned matrix
|
21
|
-
# contain the matrix <tt>L</tt>. The upper triangular part of the
|
21
|
+
# contain the matrix <tt>L</tt>. The upper triangular part of the
|
22
22
|
# returned matrix contains L^T, and
|
23
|
-
# the diagonal terms being identical for both L and L^T.
|
24
|
-
# If the input matrix is not positive-definite then the decomposition
|
25
|
-
# will fail, returning the error code <tt>GSL::EDOM</tt>.
|
23
|
+
# the diagonal terms being identical for both L and L^T.
|
24
|
+
# If the input matrix is not positive-definite then the decomposition
|
25
|
+
# will fail, returning the error code <tt>GSL::EDOM</tt>.
|
26
26
|
#
|
27
27
|
# ---
|
28
28
|
# * GSL::Linalg::Complex::Cholesky::solve(chol, b, x)
|
29
29
|
# * GSL::Linalg::Complex::cholesky_solve(chol, b, x)
|
30
30
|
#
|
31
|
-
# Solve the system <tt>A x = b</tt> using the Cholesky decomposition
|
32
|
-
# of <tt>A</tt> into the matrix <tt>chol</tt> given by
|
31
|
+
# Solve the system <tt>A x = b</tt> using the Cholesky decomposition
|
32
|
+
# of <tt>A</tt> into the matrix <tt>chol</tt> given by
|
33
33
|
# <tt>GSL::Linalg::Complex::Cholesky::decomp</tt>.
|
34
34
|
#
|
35
35
|
# ---
|
36
36
|
# * GSL::Linalg::Complex::Cholesky::svx(chol, x)
|
37
37
|
# * GSL::Linalg::Complex::cholesky_svx(chol, x)
|
38
38
|
#
|
39
|
-
# Solve the system <tt>A x = b</tt> in-place using the Cholesky decomposition
|
40
|
-
# of <tt>A</tt> into the matrix <tt>chol</tt> given by
|
41
|
-
# <tt>GSL::Linalg::Complex::Cholesky::decomp</tt>. On input <tt>x</tt>
|
42
|
-
# should contain the right-hand side <tt>b</tt>,
|
43
|
-
# which is replaced by the solution on output.
|
39
|
+
# Solve the system <tt>A x = b</tt> in-place using the Cholesky decomposition
|
40
|
+
# of <tt>A</tt> into the matrix <tt>chol</tt> given by
|
41
|
+
# <tt>GSL::Linalg::Complex::Cholesky::decomp</tt>. On input <tt>x</tt>
|
42
|
+
# should contain the right-hand side <tt>b</tt>,
|
43
|
+
# which is replaced by the solution on output.
|
44
44
|
#
|
45
|
-
# {back}[link:
|
45
|
+
# {back}[link:linalg_rdoc.html]
|
46
46
|
#
|
data/rdoc/combi.rdoc
CHANGED
@@ -1,50 +1,50 @@
|
|
1
1
|
#
|
2
2
|
# = Combinations
|
3
3
|
# Contents:
|
4
|
-
# 1. {Combination allocation}[link:
|
5
|
-
# 1. {Methods}[link:
|
6
|
-
# 1. {Accessing combination elements}[link:
|
7
|
-
# 1. {Combination properties}[link:
|
8
|
-
# 1. {Combination functions}[link:
|
9
|
-
# 1. {Reading and writing combinations}[link:
|
10
|
-
#
|
11
|
-
# ==
|
4
|
+
# 1. {Combination allocation}[link:combi_rdoc.html#label-Combination+allocation]
|
5
|
+
# 1. {Methods}[link:combi_rdoc.html#label-Methods]
|
6
|
+
# 1. {Accessing combination elements}[link:combi_rdoc.html#label-Accessing+combination+elements]
|
7
|
+
# 1. {Combination properties}[link:combi_rdoc.html#label-Combination+properties]
|
8
|
+
# 1. {Combination functions}[link:combi_rdoc.html#label-Combination+functions]
|
9
|
+
# 1. {Reading and writing combinations}[link:combi_rdoc.html#label-Reading+and+writing+combinations]
|
10
|
+
#
|
11
|
+
# == Combination allocation
|
12
12
|
# ---
|
13
13
|
# * GSL::Combination.alloc(n, k)
|
14
14
|
#
|
15
|
-
# These create a new combination with parameters <tt>n, k</tt>.
|
16
|
-
# The combination is not initialized and its elements are undefined.
|
17
|
-
# Use the method <tt>GSL::Combination.calloc</tt> if you want to create a
|
18
|
-
# combination which is initialized to the lexicographically first combination.
|
15
|
+
# These create a new combination with parameters <tt>n, k</tt>.
|
16
|
+
# The combination is not initialized and its elements are undefined.
|
17
|
+
# Use the method <tt>GSL::Combination.calloc</tt> if you want to create a
|
18
|
+
# combination which is initialized to the lexicographically first combination.
|
19
19
|
#
|
20
20
|
# ---
|
21
21
|
# * GSL::Combination.calloc(n, k)
|
22
22
|
#
|
23
|
-
# This creates a new combination with parameters <tt>n, k</tt> and initializes
|
24
|
-
# it to the lexicographically first combination.
|
23
|
+
# This creates a new combination with parameters <tt>n, k</tt> and initializes
|
24
|
+
# it to the lexicographically first combination.
|
25
25
|
#
|
26
|
-
# ==
|
26
|
+
# == Methods
|
27
27
|
#
|
28
28
|
# ---
|
29
29
|
# * GSL::Combination#init_first
|
30
30
|
#
|
31
|
-
# This method initializes the combination <tt>self</tt> to the lexicographically
|
31
|
+
# This method initializes the combination <tt>self</tt> to the lexicographically
|
32
32
|
# first combination, i.e. (0,1,2,...,k-1).
|
33
33
|
#
|
34
34
|
# ---
|
35
35
|
# * GSL::Combination#init_last
|
36
36
|
#
|
37
|
-
# This method initializes the combination <tt>self</tt> to the lexicographically last
|
37
|
+
# This method initializes the combination <tt>self</tt> to the lexicographically last
|
38
38
|
# combination, i.e. (n-k,n-k+1,...,n-1).
|
39
39
|
#
|
40
|
-
# ===
|
40
|
+
# === Accessing combination elements
|
41
41
|
# ---
|
42
42
|
# * GSL::Combination#get(i)
|
43
|
-
# * GSL::Combination#[i]
|
43
|
+
# * \GSL::Combination#[i]
|
44
44
|
#
|
45
|
-
# This returns the value of the <tt>i</tt>-th element of the combination <tt>self</tt>.
|
45
|
+
# This returns the value of the <tt>i</tt>-th element of the combination <tt>self</tt>.
|
46
46
|
#
|
47
|
-
# ===
|
47
|
+
# === Combination properties
|
48
48
|
# ---
|
49
49
|
# * GSL::Combination#n
|
50
50
|
#
|
@@ -63,8 +63,8 @@
|
|
63
63
|
# ---
|
64
64
|
# * GSL::Combination#valid
|
65
65
|
#
|
66
|
-
# This method checks that the combination <tt>self</tt> is valid.
|
67
|
-
# The <tt>k</tt> elements should contain numbers from range 0 .. n-1,
|
66
|
+
# This method checks that the combination <tt>self</tt> is valid.
|
67
|
+
# The <tt>k</tt> elements should contain numbers from range 0 .. n-1,
|
68
68
|
# each number at most once. The numbers have to be in increasing order.
|
69
69
|
#
|
70
70
|
# ---
|
@@ -72,25 +72,25 @@
|
|
72
72
|
#
|
73
73
|
# Thie returns true if the combination is valid, and false otherwise.
|
74
74
|
#
|
75
|
-
# ===
|
75
|
+
# === Combination functions
|
76
76
|
# ---
|
77
77
|
# * GSL::Combination#next
|
78
78
|
#
|
79
|
-
# This method advances the combination <tt>self</tt> to the next combination in
|
80
|
-
# lexicographic order and returns <tt>GSL::SUCCESS</tt>. If no further combinations are
|
81
|
-
# available it returns <tt>GSL::FAILURE</tt> and leaves <tt>self</tt> unmodified.
|
82
|
-
# Starting with the first combination and repeatedly applying this function will
|
79
|
+
# This method advances the combination <tt>self</tt> to the next combination in
|
80
|
+
# lexicographic order and returns <tt>GSL::SUCCESS</tt>. If no further combinations are
|
81
|
+
# available it returns <tt>GSL::FAILURE</tt> and leaves <tt>self</tt> unmodified.
|
82
|
+
# Starting with the first combination and repeatedly applying this function will
|
83
83
|
# iterate through all possible combinations of a given order.
|
84
84
|
#
|
85
85
|
# ---
|
86
86
|
# * GSL::Combination#prev
|
87
87
|
#
|
88
|
-
# This method steps backwards from the combination <tt>self</tt> to the previous
|
89
|
-
# combination in lexicographic order, returning <tt>GSL::SUCCESS</tt>.
|
90
|
-
# If no previous combination is available it returns <tt>GSL::FAILURE</tt>
|
88
|
+
# This method steps backwards from the combination <tt>self</tt> to the previous
|
89
|
+
# combination in lexicographic order, returning <tt>GSL::SUCCESS</tt>.
|
90
|
+
# If no previous combination is available it returns <tt>GSL::FAILURE</tt>
|
91
91
|
# and leaves <tt>self</tt> unmodified.
|
92
92
|
#
|
93
|
-
# ===
|
93
|
+
# === Reading and writing combinations
|
94
94
|
# ---
|
95
95
|
# * GSL::Combination#fwrite(filename)
|
96
96
|
# * GSL::Combination#fwrite(io)
|
@@ -102,7 +102,7 @@
|
|
102
102
|
# * GSL::Combination#fscanf(io)
|
103
103
|
#
|
104
104
|
#
|
105
|
-
# ==
|
105
|
+
# == Example
|
106
106
|
# #!/usr/bin/env ruby
|
107
107
|
# require("gsl")
|
108
108
|
#
|
@@ -116,10 +116,10 @@
|
|
116
116
|
# end while c.next == GSL::SUCCESS
|
117
117
|
# end
|
118
118
|
#
|
119
|
-
# {prev}[link:
|
120
|
-
# {next}[link:
|
119
|
+
# {prev}[link:perm_rdoc.html]
|
120
|
+
# {next}[link:sort_rdoc.html]
|
121
121
|
#
|
122
|
-
# {Reference index}[link:
|
122
|
+
# {Reference index}[link:ref_rdoc.html]
|
123
123
|
# {top}[link:index.html]
|
124
124
|
#
|
125
125
|
#
|