Debian Codegraph @

pod/Linalg.pod

raw ◀ ▶
Source reconstructed at patch state 0 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 %perlcode %{
2 @EXPORT_OK = qw/$GSL_LINALG_MOD_NONE $GSL_LINALG_MOD_TRANSPOSE $GSL_LINALG_MOD_CONJUGATE
3 gsl_linalg_matmult gsl_linalg_matmult_mod
4 gsl_linalg_exponential_ss
5 gsl_linalg_householder_transform
6 gsl_linalg_complex_householder_transform
7 gsl_linalg_householder_hm
8 gsl_linalg_householder_mh
9 gsl_linalg_householder_hv
10 gsl_linalg_householder_hm1
11 gsl_linalg_complex_householder_hm
12 gsl_linalg_complex_householder_mh
13 gsl_linalg_complex_householder_hv
14 gsl_linalg_hessenberg_decomp
15 gsl_linalg_hessenberg_unpack
16 gsl_linalg_hessenberg_unpack_accum
17 gsl_linalg_hessenberg_set_zero
18 gsl_linalg_hessenberg_submatrix
19 gsl_linalg_hessenberg
20 gsl_linalg_hesstri_decomp
21 gsl_linalg_SV_decomp
22 gsl_linalg_SV_decomp_mod
23 gsl_linalg_SV_decomp_jacobi
24 gsl_linalg_SV_solve
25 gsl_linalg_LU_decomp
26 gsl_linalg_LU_solve
27 gsl_linalg_LU_svx
28 gsl_linalg_LU_refine
29 gsl_linalg_LU_invert
30 gsl_linalg_LU_det
31 gsl_linalg_LU_lndet
32 gsl_linalg_LU_sgndet
33 gsl_linalg_complex_LU_decomp
34 gsl_linalg_complex_LU_solve
35 gsl_linalg_complex_LU_svx
36 gsl_linalg_complex_LU_refine
37 gsl_linalg_complex_LU_invert
38 gsl_linalg_complex_LU_det
39 gsl_linalg_complex_LU_lndet
40 gsl_linalg_complex_LU_sgndet
41 gsl_linalg_QR_decomp
42 gsl_linalg_QR_solve
43 gsl_linalg_QR_svx
44 gsl_linalg_QR_lssolve
45 gsl_linalg_QR_QRsolve
46 gsl_linalg_QR_Rsolve
47 gsl_linalg_QR_Rsvx
48 gsl_linalg_QR_update
49 gsl_linalg_QR_QTvec
50 gsl_linalg_QR_Qvec
51 gsl_linalg_QR_QTmat
52 gsl_linalg_QR_unpack
53 gsl_linalg_R_solve
54 gsl_linalg_R_svx
55 gsl_linalg_QRPT_decomp
56 gsl_linalg_QRPT_decomp2
57 gsl_linalg_QRPT_solve
58 gsl_linalg_QRPT_svx
59 gsl_linalg_QRPT_QRsolve
60 gsl_linalg_QRPT_Rsolve
61 gsl_linalg_QRPT_Rsvx
62 gsl_linalg_QRPT_update
63 gsl_linalg_LQ_decomp
64 gsl_linalg_LQ_solve_T
65 gsl_linalg_LQ_svx_T
66 gsl_linalg_LQ_lssolve_T
67 gsl_linalg_LQ_Lsolve_T
68 gsl_linalg_LQ_Lsvx_T
69 gsl_linalg_L_solve_T
70 gsl_linalg_LQ_vecQ
71 gsl_linalg_LQ_vecQT
72 gsl_linalg_LQ_unpack
73 gsl_linalg_LQ_update
74 gsl_linalg_LQ_LQsolve
75 gsl_linalg_PTLQ_decomp
76 gsl_linalg_PTLQ_decomp2
77 gsl_linalg_PTLQ_solve_T
78 gsl_linalg_PTLQ_svx_T
79 gsl_linalg_PTLQ_LQsolve_T
80 gsl_linalg_PTLQ_Lsolve_T
81 gsl_linalg_PTLQ_Lsvx_T
82 gsl_linalg_PTLQ_update
83 gsl_linalg_cholesky_decomp
84 gsl_linalg_cholesky_solve
85 gsl_linalg_cholesky_svx
86 gsl_linalg_cholesky_decomp_unit
87 gsl_linalg_complex_cholesky_decomp
88 gsl_linalg_complex_cholesky_solve
89 gsl_linalg_complex_cholesky_svx
90 gsl_linalg_symmtd_decomp
91 gsl_linalg_symmtd_unpack
92 gsl_linalg_symmtd_unpack_T
93 gsl_linalg_hermtd_decomp
94 gsl_linalg_hermtd_unpack
95 gsl_linalg_hermtd_unpack_T
96 gsl_linalg_HH_solve
97 gsl_linalg_HH_svx
98 gsl_linalg_solve_symm_tridiag
99 gsl_linalg_solve_tridiag
100 gsl_linalg_solve_symm_cyc_tridiag
101 gsl_linalg_solve_cyc_tridiag
102 gsl_linalg_bidiag_decomp
103 gsl_linalg_bidiag_unpack
104 gsl_linalg_bidiag_unpack2
105 gsl_linalg_bidiag_unpack_B
106 gsl_linalg_balance_matrix
107 gsl_linalg_balance_accum
108 gsl_linalg_balance_columns
109 gsl_linalg_givens gsl_linalg_givens_gv
110 /;
111 %EXPORT_TAGS = ( all =>[ @EXPORT_OK ] );
112
113 __END__
114
115 =encoding utf8
116
117 =head1 NAME
118
119 Math::GSL::Linalg - Functions for solving linear systems
120
121 =head1 SYNOPSIS
122
123 use Math::GSL::Linalg qw/:all/;
124
125 =head1 DESCRIPTION
126
127
128 Here is a list of all the functions included in this module :
129
130 =over
131
132 =item gsl_linalg_matmult
133
134 =item gsl_linalg_matmult_mod
135
136 =item gsl_linalg_exponential_ss
137
138 =item gsl_linalg_householder_transform
139
140 =item gsl_linalg_complex_householder_transform
141
142 =item gsl_linalg_householder_hm($tau, $v, $A) - This function applies the Householder matrix P defined by the scalar $tau and the vector $v to the left-hand side of the matrix $A. On output the result P A is stored in $A. The function returns 0 if it succeded, 1 otherwise.
143
144 =item gsl_linalg_householder_mh($tau, $v, $A) - This function applies the Householder matrix P defined by the scalar $tau and the vector $v to the right-hand side of the matrix $A. On output the result A P is stored in $A.
145
146 =item gsl_linalg_householder_hv($tau, $v, $w) - This function applies the Householder transformation P defined by the scalar $tau and the vector $v to the vector $w. On output the result P w is stored in $w.
147
148 =item gsl_linalg_householder_hm1
149
150 =item gsl_linalg_givens($a,$b,$c,$s)
151
152 Performs a Givens rotation on the vector ($a,$b) and stores the answer in $c and $s.
153
154 =item gsl_linalg_givens_gv($v, $i,$j, $c, $s)
155
156 Performs a Givens rotation on the $i and $j-th elements of $v, storing them in $c and $s.
157
158 =item gsl_linalg_complex_householder_hm($tau, $v, $A) - Does the same operation than gsl_linalg_householder_hm but with the complex matrix $A, the complex value $tau and the complex vector $v.
159
160 =item gsl_linalg_complex_householder_mh($tau, $v, $A) - Does the same operation than gsl_linalg_householder_mh but with the complex matrix $A, the complex value $tau and the complex vector $v.
161
162 =item gsl_linalg_complex_householder_hv($tau, $v, $w) - Does the same operation than gsl_linalg_householder_hv but with the complex value $tau and the complex vectors $v and $w.
163
164 =item gsl_linalg_hessenberg_decomp($A, $tau) - This function computes the Hessenberg decomposition of the matrix $A by applying the similarity transformation H = U^T A U. On output, H is stored in the upper portion of $A. The information required to construct the matrix U is stored in the lower triangular portion of $A. U is a product of N - 2 Householder matrices. The Householder vectors are stored in the lower portion of $A (below the subdiagonal) and the Householder coefficients are stored in the vector $tau. tau must be of length N. The function returns 0 if it succeded, 1 otherwise.
165
166 =item gsl_linalg_hessenberg_unpack($H, $tau, $U) - This function constructs the orthogonal matrix $U from the information stored in the Hessenberg matrix $H along with the vector $tau. $H and $tau are outputs from gsl_linalg_hessenberg_decomp.
167
168 =item gsl_linalg_hessenberg_unpack_accum($H, $tau, $V) - This function is similar to gsl_linalg_hessenberg_unpack, except it accumulates the matrix U into $V, so that V' = VU. The matrix $V must be initialized prior to calling this function. Setting $V to the identity matrix provides the same result as gsl_linalg_hessenberg_unpack. If $H is order N, then $V must have N columns but may have any number of rows.
169
170 =item gsl_linalg_hessenberg_set_zero($H) - This function sets the lower triangular portion of $H, below the subdiagonal, to zero. It is useful for clearing out the Householder vectors after calling gsl_linalg_hessenberg_decomp.
171
172 =item gsl_linalg_hessenberg_submatrix
173
174 =item gsl_linalg_hessenberg
175
176 =item gsl_linalg_hesstri_decomp($A, $B, $U, $V, $work) - This function computes the Hessenberg-Triangular decomposition of the matrix pair ($A, $B). On output, H is stored in $A, and R is stored in $B. If $U and $V are provided (they may be null), the similarity transformations are stored in them. Additional workspace of length N is needed in the vector $work.
177
178 =item gsl_linalg_SV_decomp($A, $V, $S, $work) - This function factorizes the M-by-N matrix $A into the singular value decomposition A = U S V^T for M >= N. On output the matrix $A is replaced by U. The diagonal elements of the singular value matrix S are stored in the vector $S. The singular values are non-negative and form a non-increasing sequence from S_1 to S_N. The matrix $V contains the elements of V in untransposed form. To form the product U S V^T it is necessary to take the transpose of V. A workspace of length N is required in vector $work. This routine uses the Golub-Reinsch SVD algorithm.
179
180 =item gsl_linalg_SV_decomp_mod($A, $X, $V, $S, $work) - This function computes the SVD using the modified Golub-Reinsch algorithm, which is faster for M>>N. It requires the vector $work of length N and the N-by-N matrix $X as additional working space. $A and $V are matrices while $S is a vector.
181
182 =item gsl_linalg_SV_decomp_jacobi($A, $V, $S) - This function computes the SVD of the M-by-N matrix $A using one-sided Jacobi orthogonalization for M >= N. The Jacobi method can compute singular values to higher relative accuracy than Golub-Reinsch algorithms. $V is a matrix while $S is a vector.
183
184 =item gsl_linalg_SV_solve($U, $V, $S, $b, $x) - This function solves the system A x = b using the singular value decomposition ($U, $S, $V) of A given by gsl_linalg_SV_decomp. Only non-zero singular values are used in computing the solution. The parts of the solution corresponding to singular values of zero are ignored. Other singular values can be edited out by setting them to zero before calling this function. In the over-determined case where A has more rows than columns the system is solved in the least squares sense, returning the solution x which minimizes ||A x - b||_2.
185
186 =item gsl_linalg_LU_decomp($a, $p) - factorize the matrix $a into the LU decomposition PA = LU. On output the diagonal and upper triangular part of the input matrix A contain the matrix U. The lower triangular part of the input matrix (excluding the diagonal) contains L. The diagonal elements of L are unity, and are not stored. The function returns two value, the first is 0 if the operation succeeded, 1 otherwise, and the second is the sign of the permutation.
187
188 =item gsl_linalg_LU_solve($LU, $p, $b, $x) - This function solves the square system A x = b using the LU decomposition of the matrix A into (LU, p) given by gsl_linalg_LU_decomp. $LU is a matrix, $p a permutation and $b and $x are vectors. The function returns 1 if the operation succeded, 0 otherwise.
189
190 =item gsl_linalg_LU_svx($LU, $p, $x) - This function solves the square system A x = b in-place using the LU decomposition of A into (LU,p). On input $x should contain the right-hand side b, which is replaced by the solution on output. $LU is a matrix, $p a permutation and $x is a vector. The function returns 1 if the operation succeded, 0 otherwise.
191
192 =item gsl_linalg_LU_refine($A, $LU, $p, $b, $x, $residual) - This function apply an iterative improvement to $x, the solution of $A $x = $b, using the LU decomposition of $A into ($LU,$p). The initial residual $r = $A $x - $b (where $x and $b are vectors) is also computed and stored in the vector $residual.
193
194 =item gsl_linalg_LU_invert($LU, $p, $inverse) - This function computes the inverse of a matrix A from its LU decomposition stored in the matrix $LU and the permutation $p, storing the result in the matrix $inverse.
195
196 =item gsl_linalg_LU_det($LU, $signum) - This function returns the determinant of a matrix A from its LU decomposition stored in the $LU matrix. It needs the integer $signum which is the sign of the permutation returned by gsl_linalg_LU_decomp.
197
198 =item gsl_linalg_LU_lndet($LU) - This function returns the logarithm of the absolute value of the determinant of a matrix A, from its LU decomposition stored in the $LU matrix.
199
200 =item gsl_linalg_LU_sgndet($LU, $signum) - This functions computes the sign or phase factor of the determinant of a matrix A, det(A)/|det(A)|, from its LU decomposition, $LU.
201
202 =item gsl_linalg_complex_LU_decomp($A, $p) - Does the same operation than gsl_linalg_LU_decomp but on the complex matrix $A.
203
204 =item gsl_linalg_complex_LU_solve($LU, $p, $b, $x) - This functions solve the square system A x = b using the LU decomposition of A into ($LU, $p) given by gsl_linalg_complex_LU_decomp.
205
206 =item gsl_linalg_complex_LU_svx($LU, $p, $x) - Does the same operation than gsl_linalg_LU_svx but on the complex matrix $LU and the complex vector $x.
207
208 =item gsl_linalg_complex_LU_refine($A, $LU, $p, $b, $x, $residual) - Does the same operation than gsl_linalg_LU_refine but on the complex matrices $A and $LU and with the complex vectors $b, $x and $residual.
209
210 =item gsl_linalg_complex_LU_invert($LU, $p, $inverse) - Does the same operation than gsl_linalg_LU_invert but on the complex matrces $LU and $inverse.
211
212 =item gsl_linalg_complex_LU_det($LU, $signum) - Does the same operation than gsl_linalg_LU_det but on the complex matrix $LU.
213
214 =item gsl_linalg_complex_LU_lndet($LU) - Does the same operation than gsl_linalg_LU_det but on the complex matrix $LU.
215
216 =item gsl_linalg_complex_LU_sgndet($LU, $signum) - Does the same operation than gsl_linalg_LU_sgndet but on the complex matrix $LU.
217
218 =item gsl_linalg_QR_decomp($a, $tau) - factorize the M-by-N matrix A into the QR decomposition A = Q R. On output the diagonal and upper triangular part of the input matrix $a contain the matrix R. The vector $tau and the columns of the lower triangular part of the matrix $a contain the Householder coefficients and Householder vectors which encode the orthogonal matrix Q. The vector tau must be of length k= min(M,N).
219
220 =item gsl_linalg_QR_solve($QR, $tau, $b, $x) - This function solves the square system A x = b using the QR decomposition of A into (QR, tau) given by gsl_linalg_QR_decomp. $QR is matrix, and $tau, $b and $x are vectors.
221
222 =item gsl_linalg_QR_svx($QR, $tau, $x) - This function solves the square system A x = b in-place using the QR decomposition of A into the matrix $QR and the vector $tau given by gsl_linalg_QR_decomp. On input, the vector $x should contain the right-hand side b, which is replaced by the solution on output.
223
224 =item gsl_linalg_QR_lssolve($QR, $tau, $b, $x, $residual) - This function finds the least squares solution to the overdetermined system $A $x = $b where the matrix $A has more rows than columns. The least squares solution minimizes the Euclidean norm of the residual, ||Ax - b||.The routine uses the $QR decomposition of $A into ($QR, $tau) given by gsl_linalg_QR_decomp. The solution is returned in $x. The residual is computed as a by-product and stored in residual. The function returns 0 if it succeded, 1 otherwise.
225
226 =item gsl_linalg_QR_QRsolve($Q, $R, $b, $x) - This function solves the system $R $x = $Q**T $b for $x. It can be used when the $QR decomposition of a matrix is available in unpacked form as ($Q, $R). The function returns 0 if it succeded, 1 otherwise.
227
228 =item gsl_linalg_QR_Rsolve($QR, $b, $x) - This function solves the triangular system R $x = $b for $x. It may be useful if the product b' = Q^T b has already been computed using gsl_linalg_QR_QTvec.
229
230 =item gsl_linalg_QR_Rsvx($QR, $x) - This function solves the triangular system R $x = b for $x in-place. On input $x should contain the right-hand side b and is replaced by the solution on output. This function may be useful if the product b' = Q^T b has already been computed using gsl_linalg_QR_QTvec. The function returns 0 if it succeded, 1 otherwise.
231
232 =item gsl_linalg_QR_update($Q, $R, $b, $x) - This function performs a rank-1 update $w $v**T of the QR decomposition ($Q, $R). The update is given by Q'R' = Q R + w v^T where the output matrices Q' and R' are also orthogonal and right triangular. Note that w is destroyed by the update. The function returns 0 if it succeded, 1 otherwise.
233
234 =item gsl_linalg_QR_QTvec($QR, $tau, $v) - This function applies the matrix Q^T encoded in the decomposition ($QR,$tau) to the vector $v, storing the result Q^T v in $v. The matrix multiplication is carried out directly using the encoding of the Householder vectors without needing to form the full matrix Q^T. The function returns 0 if it succeded, 1 otherwise.
235
236 =item gsl_linalg_QR_Qvec($QR, $tau, $v) - This function applies the matrix Q encoded in the decomposition ($QR,$tau) to the vector $v, storing the result Q v in $v. The matrix multiplication is carried out directly using the encoding of the Householder vectors without needing to form the full matrix Q. The function returns 0 if it succeded, 1 otherwise.
237
238 =item gsl_linalg_QR_QTmat($QR, $tau, $A) - This function applies the matrix Q^T encoded in the decomposition ($QR,$tau) to the matrix $A, storing the result Q^T A in $A. The matrix multiplication is carried out directly using the encoding of the Householder vectors without needing to form the full matrix Q^T. The function returns 0 if it succeded, 1 otherwise.
239
240 =item gsl_linalg_QR_unpack($QR, $tau, $Q, $R) - This function unpacks the encoded QR decomposition ($QR,$tau) into the matrices $Q and $R, where $Q is M-by-M and $R is M-by-N. The function returns 0 if it succeded, 1 otherwise.
241
242 =item gsl_linalg_R_solve($R, $b, $x) - This function solves the triangular system $R $x = $b for the N-by-N matrix $R. The function returns 0 if it succeded, 1 otherwise.
243
244 =item gsl_linalg_R_svx($R, $x) - This function solves the triangular system $R $x = b in-place. On input $x should contain the right-hand side b, which is replaced by the solution on output. The function returns 0 if it succeded, 1 otherwise.
245
246 =item gsl_linalg_QRPT_decomp($A, $tau, $p, $norm) - This function factorizes the M-by-N matrix $A into the QRP^T decomposition A = Q R P^T. On output the diagonal and upper triangular part of the input matrix contain the matrix R. The permutation matrix P is stored in the permutation $p. There's two value returned by this function : the first is 0 if the operation succeeded, 1 otherwise. The second is sign of the permutation. It has the value (-1)^n, where n is the number of interchanges in the permutation. The vector $tau and the columns of the lower triangular part of the matrix $A contain the Householder coefficients and vectors which encode the orthogonal matrix Q. The vector tau must be of length k=\min(M,N). The matrix Q is related to these components by, Q = Q_k ... Q_2 Q_1 where Q_i = I - \tau_i v_i v_i^T and v_i is the Householder vector v_i = (0,...,1,A(i+1,i),A(i+2,i),...,A(m,i)). This is the same storage scheme as used by lapack. The vector norm is a workspace of length N used for column pivoting. The algorithm used to perform the decomposition is Householder QR with column pivoting (Golub & Van Loan, Matrix Computations, Algorithm 5.4.1).
247
248 =item gsl_linalg_QRPT_decomp2($A, $q, $r, $tau, $p, $norm) - This function factorizes the matrix $A into the decomposition A = Q R P^T without modifying $A itself and storing the output in the separate matrices $q and $r. For the rest, it operates exactly like gsl_linalg_QRPT_decomp
249
250 =item gsl_linalg_QRPT_solve
251
252 =item gsl_linalg_QRPT_svx
253
254 =item gsl_linalg_QRPT_QRsolve
255
256 =item gsl_linalg_QRPT_Rsolve
257
258 =item gsl_linalg_QRPT_Rsvx
259
260 =item gsl_linalg_QRPT_update
261
262 =item gsl_linalg_LQ_decomp
263
264 =item gsl_linalg_LQ_solve_T
265
266 =item gsl_linalg_LQ_svx_T
267
268 =item gsl_linalg_LQ_lssolve_T
269
270 =item gsl_linalg_LQ_Lsolve_T
271
272 =item gsl_linalg_LQ_Lsvx_T
273
274 =item gsl_linalg_L_solve_T
275
276 =item gsl_linalg_LQ_vecQ
277
278 =item gsl_linalg_LQ_vecQT
279
280 =item gsl_linalg_LQ_unpack
281
282 =item gsl_linalg_LQ_update
283
284 =item gsl_linalg_LQ_LQsolve
285
286 =item gsl_linalg_PTLQ_decomp
287
288 =item gsl_linalg_PTLQ_decomp2
289
290 =item gsl_linalg_PTLQ_solve_T
291
292 =item gsl_linalg_PTLQ_svx_T
293
294 =item gsl_linalg_PTLQ_LQsolve_T
295
296 =item gsl_linalg_PTLQ_Lsolve_T
297
298 =item gsl_linalg_PTLQ_Lsvx_T
299
300 =item gsl_linalg_PTLQ_update
301
302 =item gsl_linalg_cholesky_decomp($A) - Factorize the symmetric, positive-definite square matrix $A into the Cholesky decomposition A = L L^T and stores it into the matrix $A. The function returns 0 if the operation succeeded, 0 otherwise.
303
304 =item gsl_linalg_cholesky_solve($cholesky, $b, $x) - This function solves the system A x = b using the Cholesky decomposition of A into the matrix $cholesky given by gsl_linalg_cholesky_decomp. $b and $x are vectors. The function returns 0 if the operation succeeded, 0 otherwise.
305
306 =item gsl_linalg_cholesky_svx($cholesky, $x) - This function solves the system A x = b in-place using the Cholesky decomposition of A into the matrix $cholesky given by gsl_linalg_cholesky_decomp. On input the vector $x should contain the right-hand side b, which is replaced by the solution on output. The function returns 0 if the operation succeeded, 0 otherwise.
307
308 =item gsl_linalg_cholesky_decomp_unit
309
310 =item gsl_linalg_complex_cholesky_decomp($A) - Factorize the symmetric, positive-definite square matrix $A which contains complex numbers into the Cholesky decomposition A = L L^T and stores it into the matrix $A. The function returns 0 if the operation succeeded, 0 otherwise.
311
312 =item gsl_linalg_complex_cholesky_solve($cholesky, $b, $x) - This function solves the system A x = b using the Cholesky decomposition of A into the matrix $cholesky given by gsl_linalg_complex_cholesky_decomp. $b and $x are vectors. The function returns 0 if the operation succeeded, 0 otherwise.
313
314 =item gsl_linalg_complex_cholesky_svx($cholesky, $x) - This function solves the system A x = b in-place using the Cholesky decomposition of A into the matrix $cholesky given by gsl_linalg_complex_cholesky_decomp. On input the vector $x should contain the right-hand side b, which is replaced by the solution on output. The function returns 0 if the operation succeeded, 0 otherwise.
315
316 =item gsl_linalg_symmtd_decomp($A, $tau) - This function factorizes the symmetric square matrix $A into the symmetric tridiagonal decomposition Q T Q^T. On output the diagonal and subdiagonal part of the input matrix $A contain the tridiagonal matrix T. The remaining lower triangular part of the input matrix contains the Householder vectors which, together with the Householder coefficients $tau, encode the orthogonal matrix Q. This storage scheme is the same as used by lapack. The upper triangular part of $A is not referenced. $tau is a vector.
317
318 =item gsl_linalg_symmtd_unpack($A, $tau, $Q, $diag, $subdiag) - This function unpacks the encoded symmetric tridiagonal decomposition ($A, $tau) obtained from gsl_linalg_symmtd_decomp into the orthogonal matrix $Q, the vector of diagonal elements $diag and the vector of subdiagonal elements $subdiag.
319
320 =item gsl_linalg_symmtd_unpack_T($A, $diag, $subdiag) - This function unpacks the diagonal and subdiagonal of the encoded symmetric tridiagonal decomposition ($A, $tau) obtained from gsl_linalg_symmtd_decomp into the vectors $diag and $subdiag.
321
322 =item gsl_linalg_hermtd_decomp($A, $tau) - This function factorizes the hermitian matrix $A into the symmetric tridiagonal decomposition U T U^T. On output the real parts of the diagonal and subdiagonal part of the input matrix $A contain the tridiagonal matrix T. The remaining lower triangular part of the input matrix contains the Householder vectors which, together with the Householder coefficients $tau, encode the orthogonal matrix Q. This storage scheme is the same as used by lapack. The upper triangular part of $A and imaginary parts of the diagonal are not referenced. $A is a complex matrix and $tau a complex vector.
323
324 =item gsl_linalg_hermtd_unpack($A, $tau, $U, $diag, $subdiag) - This function unpacks the encoded tridiagonal decomposition ($A, $tau) obtained from gsl_linalg_hermtd_decomp into the unitary complex matrix $U, the real vector of diagonal elements $diag and the real vector of subdiagonal elements $subdiag.
325
326 =item gsl_linalg_hermtd_unpack_T($A, $diag, $subdiag) - This function unpacks the diagonal and subdiagonal of the encoded tridiagonal decomposition (A, tau) obtained from the gsl_linalg_hermtd_decomp into the real vectors $diag and $subdiag.
327
328 =item gsl_linalg_HH_solve($a, $b, $x) - This function solves the system $A $x = $b directly using Householder transformations where $A is a matrix, $b and $x vectors. On output the solution is stored in $x and $b is not modified. $A is destroyed by the Householder transformations.
329
330 =item gsl_linalg_HH_svx($A, $x) - This function solves the system $A $x = b in-place using Householder transformations where $A is a matrix, $b is a vector. On input $x should contain the right-hand side b, which is replaced by the solution on output. The matrix $A is destroyed by the Householder transformations.
331
332 =item gsl_linalg_solve_symm_tridiag
333
334 =item gsl_linalg_solve_tridiag
335
336 =item gsl_linalg_solve_symm_cyc_tridiag
337
338 =item gsl_linalg_solve_cyc_tridiag
339
340 =item gsl_linalg_bidiag_decomp
341
342 =item gsl_linalg_bidiag_unpack
343
344 =item gsl_linalg_bidiag_unpack2
345
346 =item gsl_linalg_bidiag_unpack_B
347
348 =item gsl_linalg_balance_matrix
349
350 =item gsl_linalg_balance_accum
351
352 =item gsl_linalg_balance_columns
353
354
355 You have to add the functions you want to use inside the qw /put_function_here / with spaces between each function. You can also write use Math::GSL::Complex qw/:all/ to use all available functions of the module.
356
357 For more informations on the functions, we refer you to the GSL official documentation: L<http://www.gnu.org/software/gsl/manual/html_node/>
358
359
360 =back
361
362 =head1 EXAMPLES
363
364 This example shows how to compute the determinant of a matrix with the LU decomposition:
365
366 use Math::GSL::Matrix qw/:all/;
367 use Math::GSL::Permutation qw/:all/;
368 use Math::GSL::Linalg qw/:all/;
369
370 my $Matrix = gsl_matrix_alloc(4,4);
371 map { gsl_matrix_set($Matrix, 0, $_, $_+1) } (0..3);
372
373 gsl_matrix_set($Matrix,1, 0, 2);
374 gsl_matrix_set($Matrix, 1, 1, 3);
375 gsl_matrix_set($Matrix, 1, 2, 4);
376 gsl_matrix_set($Matrix, 1, 3, 1);
377
378 gsl_matrix_set($Matrix, 2, 0, 3);
379 gsl_matrix_set($Matrix, 2, 1, 4);
380 gsl_matrix_set($Matrix, 2, 2, 1);
381 gsl_matrix_set($Matrix, 2, 3, 2);
382
383 gsl_matrix_set($Matrix, 3, 0, 4);
384 gsl_matrix_set($Matrix, 3, 1, 1);
385 gsl_matrix_set($Matrix, 3, 2, 2);
386 gsl_matrix_set($Matrix, 3, 3, 3);
387
388 my $permutation = gsl_permutation_alloc(4);
389 gsl_permutation_init($permutation);
390 my ($result, $signum) = gsl_linalg_LU_decomp($Matrix, $permutation);
391 my $det = gsl_linalg_LU_det($Matrix, $signum);
392 print "The value of the determinant of the matrix is $det \n";
393
394 =head1 AUTHORS
395
396 Jonathan "Duke" Leto <[email protected]> and Thierry Moisan <[email protected]>
397
398 =head1 COPYRIGHT AND LICENSE
399
400 Copyright (C) 2008-2024 Jonathan "Duke" Leto and Thierry Moisan
401
402 This program is free software; you can redistribute it and/or modify it
403 under the same terms as Perl itself.
404
405 =cut
406 %}