2 %apply int
*OUTPUT { int
*signum
};
5 #include
"/usr/local/include/gsl/gsl_linalg.h"
6 #include
"/usr/local/include/gsl/gsl_permutation.h"
9 %include
"/usr/local/include/gsl/gsl_linalg.h"
10 %include
"/usr/local/include/gsl/gsl_permutation.h"
13 @EXPORT_OK
= qw
/$GSL_LINALG_MOD_NONE $GSL_LINALG_MOD_TRANSPOSE $GSL_LINALG_MOD_CONJUGATE
14 gsl_linalg_matmult gsl_linalg_matmult_mod
15 gsl_linalg_exponential_ss
16 gsl_linalg_householder_transform
17 gsl_linalg_complex_householder_transform
18 gsl_linalg_householder_hm
19 gsl_linalg_householder_mh
20 gsl_linalg_householder_hv
21 gsl_linalg_householder_hm1
22 gsl_linalg_complex_householder_hm
23 gsl_linalg_complex_householder_mh
24 gsl_linalg_complex_householder_hv
25 gsl_linalg_hessenberg_decomp
26 gsl_linalg_hessenberg_unpack
27 gsl_linalg_hessenberg_unpack_accum
28 gsl_linalg_hessenberg_set_zero
29 gsl_linalg_hessenberg_submatrix
31 gsl_linalg_hesstri_decomp
33 gsl_linalg_SV_decomp_mod
34 gsl_linalg_SV_decomp_jacobi
44 gsl_linalg_complex_LU_decomp
45 gsl_linalg_complex_LU_solve
46 gsl_linalg_complex_LU_svx
47 gsl_linalg_complex_LU_refine
48 gsl_linalg_complex_LU_invert
49 gsl_linalg_complex_LU_det
50 gsl_linalg_complex_LU_lndet
51 gsl_linalg_complex_LU_sgndet
66 gsl_linalg_QRPT_decomp
67 gsl_linalg_QRPT_decomp2
70 gsl_linalg_QRPT_QRsolve
71 gsl_linalg_QRPT_Rsolve
73 gsl_linalg_QRPT_update
77 gsl_linalg_LQ_lssolve_T
78 gsl_linalg_LQ_Lsolve_T
86 gsl_linalg_PTLQ_decomp
87 gsl_linalg_PTLQ_decomp2
88 gsl_linalg_PTLQ_solve_T
90 gsl_linalg_PTLQ_LQsolve_T
91 gsl_linalg_PTLQ_Lsolve_T
92 gsl_linalg_PTLQ_Lsvx_T
93 gsl_linalg_PTLQ_update
94 gsl_linalg_cholesky_decomp
95 gsl_linalg_cholesky_solve
96 gsl_linalg_cholesky_svx
97 gsl_linalg_cholesky_decomp_unit
98 gsl_linalg_complex_cholesky_decomp
99 gsl_linalg_complex_cholesky_solve
100 gsl_linalg_complex_cholesky_svx
101 gsl_linalg_symmtd_decomp
102 gsl_linalg_symmtd_unpack
103 gsl_linalg_symmtd_unpack_T
104 gsl_linalg_hermtd_decomp
105 gsl_linalg_hermtd_unpack
106 gsl_linalg_hermtd_unpack_T
109 gsl_linalg_solve_symm_tridiag
110 gsl_linalg_solve_tridiag
111 gsl_linalg_solve_symm_cyc_tridiag
112 gsl_linalg_solve_cyc_tridiag
113 gsl_linalg_bidiag_decomp
114 gsl_linalg_bidiag_unpack
115 gsl_linalg_bidiag_unpack2
116 gsl_linalg_bidiag_unpack_B
117 gsl_linalg_balance_matrix
118 gsl_linalg_balance_accum
119 gsl_linalg_balance_columns
121 %EXPORT_TAGS
= ( all
=>[ @EXPORT_OK
] );
127 Math
::GSL
::Linalg
- Functions for solving linear systems
131 use Math
::GSL
::Linalg qw
/:all
/;
136 Here is a list of all the functions included in this module
:
137 gsl_linalg_matmult gsl_linalg_matmult_mod
138 gsl_linalg_exponential_ss
139 gsl_linalg_householder_transform
140 gsl_linalg_complex_householder_transform
141 gsl_linalg_householder_hm
142 gsl_linalg_householder_mh
143 gsl_linalg_householder_hv
144 gsl_linalg_householder_hm1
145 gsl_linalg_complex_householder_hm
146 gsl_linalg_complex_householder_mh
147 gsl_linalg_complex_householder_hv
148 gsl_linalg_hessenberg_decomp
149 gsl_linalg_hessenberg_unpack
150 gsl_linalg_hessenberg_unpack_accum
151 gsl_linalg_hessenberg_set_zero
152 gsl_linalg_hessenberg_submatrix
153 gsl_linalg_hessenberg
154 gsl_linalg_hesstri_decomp
156 gsl_linalg_SV_decomp_mod
157 gsl_linalg_SV_decomp_jacobi
159 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.
160 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.
161 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.
163 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.
164 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.
165 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.
167 gsl_linalg_complex_LU_decomp
168 gsl_linalg_complex_LU_solve
169 gsl_linalg_complex_LU_svx
170 gsl_linalg_complex_LU_refine
171 gsl_linalg_complex_LU_invert
172 gsl_linalg_complex_LU_det
173 gsl_linalg_complex_LU_lndet
174 gsl_linalg_complex_LU_sgndet
175 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
).
176 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.
177 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.
178 gsl_linalg_QR_lssolve
179 gsl_linalg_QR_QRsolve
189 gsl_linalg_QRPT_decomp
190 gsl_linalg_QRPT_decomp2
191 gsl_linalg_QRPT_solve
193 gsl_linalg_QRPT_QRsolve
194 gsl_linalg_QRPT_Rsolve
196 gsl_linalg_QRPT_update
198 gsl_linalg_LQ_solve_T
200 gsl_linalg_LQ_lssolve_T
201 gsl_linalg_LQ_Lsolve_T
208 gsl_linalg_LQ_LQsolve
209 gsl_linalg_PTLQ_decomp
210 gsl_linalg_PTLQ_decomp2
211 gsl_linalg_PTLQ_solve_T
212 gsl_linalg_PTLQ_svx_T
213 gsl_linalg_PTLQ_LQsolve_T
214 gsl_linalg_PTLQ_Lsolve_T
215 gsl_linalg_PTLQ_Lsvx_T
216 gsl_linalg_PTLQ_update
217 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 funtcion returns
0 if the operation succeeded
, 0 otherwise.
218 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 funtcion returns
0 if the operation succeeded
, 0 otherwise.
219 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 funtcion returns
0 if the operation succeeded
, 0 otherwise.
220 gsl_linalg_cholesky_decomp_unit
221 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 funtcion returns
0 if the operation succeeded
, 0 otherwise.
222 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 funtcion returns
0 if the operation succeeded
, 0 otherwise.
223 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 funtcion returns
0 if the operation succeeded
, 0 otherwise.
224 gsl_linalg_symmtd_decomp
225 gsl_linalg_symmtd_unpack
226 gsl_linalg_symmtd_unpack_T
227 gsl_linalg_hermtd_decomp
228 gsl_linalg_hermtd_unpack
229 gsl_linalg_hermtd_unpack_T
232 gsl_linalg_solve_symm_tridiag
233 gsl_linalg_solve_tridiag
234 gsl_linalg_solve_symm_cyc_tridiag
235 gsl_linalg_solve_cyc_tridiag
236 gsl_linalg_bidiag_decomp
237 gsl_linalg_bidiag_unpack
238 gsl_linalg_bidiag_unpack2
239 gsl_linalg_bidiag_unpack_B
240 gsl_linalg_balance_matrix
241 gsl_linalg_balance_accum
242 gsl_linalg_balance_columns
244 You have to add the functions you want to use inside the qw
/put_funtion_here
/ with spaces between each function. You can also write use Math
::GSL
::Complex qw
/:all
/ to use all avaible functions of the module.
246 For more informations on the functions
, we refer you to the GSL offcial documentation
: L
<http
://www.gnu.org
/software
/gsl
/manual
/html_node
/>
247 Tip
: search on google
: site
:http
://www.gnu.org
/software
/gsl
/manual
/html_node
/ name_of_the_function_you_want
254 Jonathan Leto
<jonathan@leto.net
> and Thierry Moisan
<thierry.moisan@gmail.com
>
256 =head1 COPYRIGHT
AND LICENSE
258 Copyright
(C
) 2008 Jonathan Leto and Thierry Moisan
260 This program is free software
; you can redistribute it and
/or modify it
261 under the same terms as Perl itself.