1# This file was automatically generated by SWIG (http://www.swig.org).
2# Version 4.0.1
3#
4# Do not make changes to this file unless you know what you are doing--modify
5# the SWIG interface file instead.
6
7package Math::GSL::Linalg;
8use base qw(Exporter);
9use base qw(DynaLoader);
10package Math::GSL::Linalgc;
11bootstrap Math::GSL::Linalg;
12package Math::GSL::Linalg;
13@EXPORT = qw();
14
15# ---------- BASE METHODS -------------
16
17package Math::GSL::Linalg;
18
19sub TIEHASH {
20    my ($classname,$obj) = @_;
21    return bless $obj, $classname;
22}
23
24sub CLEAR { }
25
26sub FIRSTKEY { }
27
28sub NEXTKEY { }
29
30sub FETCH {
31    my ($self,$field) = @_;
32    my $member_func = "swig_${field}_get";
33    $self->$member_func();
34}
35
36sub STORE {
37    my ($self,$field,$newval) = @_;
38    my $member_func = "swig_${field}_set";
39    $self->$member_func($newval);
40}
41
42sub this {
43    my $ptr = shift;
44    return tied(%$ptr);
45}
46
47
48# ------- FUNCTION WRAPPERS --------
49
50package Math::GSL::Linalg;
51
52*gsl_error = *Math::GSL::Linalgc::gsl_error;
53*gsl_stream_printf = *Math::GSL::Linalgc::gsl_stream_printf;
54*gsl_strerror = *Math::GSL::Linalgc::gsl_strerror;
55*gsl_set_error_handler = *Math::GSL::Linalgc::gsl_set_error_handler;
56*gsl_set_error_handler_off = *Math::GSL::Linalgc::gsl_set_error_handler_off;
57*gsl_set_stream_handler = *Math::GSL::Linalgc::gsl_set_stream_handler;
58*gsl_set_stream = *Math::GSL::Linalgc::gsl_set_stream;
59*gsl_linalg_matmult = *Math::GSL::Linalgc::gsl_linalg_matmult;
60*gsl_linalg_matmult_mod = *Math::GSL::Linalgc::gsl_linalg_matmult_mod;
61*gsl_linalg_exponential_ss = *Math::GSL::Linalgc::gsl_linalg_exponential_ss;
62*gsl_linalg_householder_transform = *Math::GSL::Linalgc::gsl_linalg_householder_transform;
63*gsl_linalg_complex_householder_transform = *Math::GSL::Linalgc::gsl_linalg_complex_householder_transform;
64*gsl_linalg_householder_hm = *Math::GSL::Linalgc::gsl_linalg_householder_hm;
65*gsl_linalg_householder_mh = *Math::GSL::Linalgc::gsl_linalg_householder_mh;
66*gsl_linalg_householder_hv = *Math::GSL::Linalgc::gsl_linalg_householder_hv;
67*gsl_linalg_householder_hm1 = *Math::GSL::Linalgc::gsl_linalg_householder_hm1;
68*gsl_linalg_complex_householder_hm = *Math::GSL::Linalgc::gsl_linalg_complex_householder_hm;
69*gsl_linalg_complex_householder_mh = *Math::GSL::Linalgc::gsl_linalg_complex_householder_mh;
70*gsl_linalg_complex_householder_hv = *Math::GSL::Linalgc::gsl_linalg_complex_householder_hv;
71*gsl_linalg_hessenberg_decomp = *Math::GSL::Linalgc::gsl_linalg_hessenberg_decomp;
72*gsl_linalg_hessenberg_unpack = *Math::GSL::Linalgc::gsl_linalg_hessenberg_unpack;
73*gsl_linalg_hessenberg_unpack_accum = *Math::GSL::Linalgc::gsl_linalg_hessenberg_unpack_accum;
74*gsl_linalg_hessenberg_set_zero = *Math::GSL::Linalgc::gsl_linalg_hessenberg_set_zero;
75*gsl_linalg_hessenberg_submatrix = *Math::GSL::Linalgc::gsl_linalg_hessenberg_submatrix;
76*gsl_linalg_hesstri_decomp = *Math::GSL::Linalgc::gsl_linalg_hesstri_decomp;
77*gsl_linalg_SV_decomp = *Math::GSL::Linalgc::gsl_linalg_SV_decomp;
78*gsl_linalg_SV_decomp_mod = *Math::GSL::Linalgc::gsl_linalg_SV_decomp_mod;
79*gsl_linalg_SV_decomp_jacobi = *Math::GSL::Linalgc::gsl_linalg_SV_decomp_jacobi;
80*gsl_linalg_SV_solve = *Math::GSL::Linalgc::gsl_linalg_SV_solve;
81*gsl_linalg_SV_leverage = *Math::GSL::Linalgc::gsl_linalg_SV_leverage;
82*gsl_linalg_LU_decomp = *Math::GSL::Linalgc::gsl_linalg_LU_decomp;
83*gsl_linalg_LU_solve = *Math::GSL::Linalgc::gsl_linalg_LU_solve;
84*gsl_linalg_LU_svx = *Math::GSL::Linalgc::gsl_linalg_LU_svx;
85*gsl_linalg_LU_refine = *Math::GSL::Linalgc::gsl_linalg_LU_refine;
86*gsl_linalg_LU_invert = *Math::GSL::Linalgc::gsl_linalg_LU_invert;
87*gsl_linalg_LU_det = *Math::GSL::Linalgc::gsl_linalg_LU_det;
88*gsl_linalg_LU_lndet = *Math::GSL::Linalgc::gsl_linalg_LU_lndet;
89*gsl_linalg_LU_sgndet = *Math::GSL::Linalgc::gsl_linalg_LU_sgndet;
90*gsl_linalg_complex_LU_decomp = *Math::GSL::Linalgc::gsl_linalg_complex_LU_decomp;
91*gsl_linalg_complex_LU_solve = *Math::GSL::Linalgc::gsl_linalg_complex_LU_solve;
92*gsl_linalg_complex_LU_svx = *Math::GSL::Linalgc::gsl_linalg_complex_LU_svx;
93*gsl_linalg_complex_LU_refine = *Math::GSL::Linalgc::gsl_linalg_complex_LU_refine;
94*gsl_linalg_complex_LU_invert = *Math::GSL::Linalgc::gsl_linalg_complex_LU_invert;
95*gsl_linalg_complex_LU_det = *Math::GSL::Linalgc::gsl_linalg_complex_LU_det;
96*gsl_linalg_complex_LU_lndet = *Math::GSL::Linalgc::gsl_linalg_complex_LU_lndet;
97*gsl_linalg_complex_LU_sgndet = *Math::GSL::Linalgc::gsl_linalg_complex_LU_sgndet;
98*gsl_linalg_QR_decomp = *Math::GSL::Linalgc::gsl_linalg_QR_decomp;
99*gsl_linalg_QR_solve = *Math::GSL::Linalgc::gsl_linalg_QR_solve;
100*gsl_linalg_QR_svx = *Math::GSL::Linalgc::gsl_linalg_QR_svx;
101*gsl_linalg_QR_lssolve = *Math::GSL::Linalgc::gsl_linalg_QR_lssolve;
102*gsl_linalg_QR_QRsolve = *Math::GSL::Linalgc::gsl_linalg_QR_QRsolve;
103*gsl_linalg_QR_Rsolve = *Math::GSL::Linalgc::gsl_linalg_QR_Rsolve;
104*gsl_linalg_QR_Rsvx = *Math::GSL::Linalgc::gsl_linalg_QR_Rsvx;
105*gsl_linalg_QR_update = *Math::GSL::Linalgc::gsl_linalg_QR_update;
106*gsl_linalg_QR_QTvec = *Math::GSL::Linalgc::gsl_linalg_QR_QTvec;
107*gsl_linalg_QR_Qvec = *Math::GSL::Linalgc::gsl_linalg_QR_Qvec;
108*gsl_linalg_QR_QTmat = *Math::GSL::Linalgc::gsl_linalg_QR_QTmat;
109*gsl_linalg_QR_matQ = *Math::GSL::Linalgc::gsl_linalg_QR_matQ;
110*gsl_linalg_QR_unpack = *Math::GSL::Linalgc::gsl_linalg_QR_unpack;
111*gsl_linalg_R_solve = *Math::GSL::Linalgc::gsl_linalg_R_solve;
112*gsl_linalg_R_svx = *Math::GSL::Linalgc::gsl_linalg_R_svx;
113*gsl_linalg_QRPT_decomp = *Math::GSL::Linalgc::gsl_linalg_QRPT_decomp;
114*gsl_linalg_QRPT_decomp2 = *Math::GSL::Linalgc::gsl_linalg_QRPT_decomp2;
115*gsl_linalg_QRPT_solve = *Math::GSL::Linalgc::gsl_linalg_QRPT_solve;
116*gsl_linalg_QRPT_svx = *Math::GSL::Linalgc::gsl_linalg_QRPT_svx;
117*gsl_linalg_QRPT_QRsolve = *Math::GSL::Linalgc::gsl_linalg_QRPT_QRsolve;
118*gsl_linalg_QRPT_Rsolve = *Math::GSL::Linalgc::gsl_linalg_QRPT_Rsolve;
119*gsl_linalg_QRPT_Rsvx = *Math::GSL::Linalgc::gsl_linalg_QRPT_Rsvx;
120*gsl_linalg_QRPT_update = *Math::GSL::Linalgc::gsl_linalg_QRPT_update;
121*gsl_linalg_LQ_decomp = *Math::GSL::Linalgc::gsl_linalg_LQ_decomp;
122*gsl_linalg_LQ_solve_T = *Math::GSL::Linalgc::gsl_linalg_LQ_solve_T;
123*gsl_linalg_LQ_svx_T = *Math::GSL::Linalgc::gsl_linalg_LQ_svx_T;
124*gsl_linalg_LQ_lssolve_T = *Math::GSL::Linalgc::gsl_linalg_LQ_lssolve_T;
125*gsl_linalg_LQ_Lsolve_T = *Math::GSL::Linalgc::gsl_linalg_LQ_Lsolve_T;
126*gsl_linalg_LQ_Lsvx_T = *Math::GSL::Linalgc::gsl_linalg_LQ_Lsvx_T;
127*gsl_linalg_L_solve_T = *Math::GSL::Linalgc::gsl_linalg_L_solve_T;
128*gsl_linalg_LQ_vecQ = *Math::GSL::Linalgc::gsl_linalg_LQ_vecQ;
129*gsl_linalg_LQ_vecQT = *Math::GSL::Linalgc::gsl_linalg_LQ_vecQT;
130*gsl_linalg_LQ_unpack = *Math::GSL::Linalgc::gsl_linalg_LQ_unpack;
131*gsl_linalg_LQ_update = *Math::GSL::Linalgc::gsl_linalg_LQ_update;
132*gsl_linalg_LQ_LQsolve = *Math::GSL::Linalgc::gsl_linalg_LQ_LQsolve;
133*gsl_linalg_PTLQ_decomp = *Math::GSL::Linalgc::gsl_linalg_PTLQ_decomp;
134*gsl_linalg_PTLQ_decomp2 = *Math::GSL::Linalgc::gsl_linalg_PTLQ_decomp2;
135*gsl_linalg_PTLQ_solve_T = *Math::GSL::Linalgc::gsl_linalg_PTLQ_solve_T;
136*gsl_linalg_PTLQ_svx_T = *Math::GSL::Linalgc::gsl_linalg_PTLQ_svx_T;
137*gsl_linalg_PTLQ_LQsolve_T = *Math::GSL::Linalgc::gsl_linalg_PTLQ_LQsolve_T;
138*gsl_linalg_PTLQ_Lsolve_T = *Math::GSL::Linalgc::gsl_linalg_PTLQ_Lsolve_T;
139*gsl_linalg_PTLQ_Lsvx_T = *Math::GSL::Linalgc::gsl_linalg_PTLQ_Lsvx_T;
140*gsl_linalg_PTLQ_update = *Math::GSL::Linalgc::gsl_linalg_PTLQ_update;
141*gsl_linalg_cholesky_decomp = *Math::GSL::Linalgc::gsl_linalg_cholesky_decomp;
142*gsl_linalg_cholesky_solve = *Math::GSL::Linalgc::gsl_linalg_cholesky_solve;
143*gsl_linalg_cholesky_svx = *Math::GSL::Linalgc::gsl_linalg_cholesky_svx;
144*gsl_linalg_cholesky_invert = *Math::GSL::Linalgc::gsl_linalg_cholesky_invert;
145*gsl_linalg_cholesky_decomp_unit = *Math::GSL::Linalgc::gsl_linalg_cholesky_decomp_unit;
146*gsl_linalg_complex_cholesky_decomp = *Math::GSL::Linalgc::gsl_linalg_complex_cholesky_decomp;
147*gsl_linalg_complex_cholesky_solve = *Math::GSL::Linalgc::gsl_linalg_complex_cholesky_solve;
148*gsl_linalg_complex_cholesky_svx = *Math::GSL::Linalgc::gsl_linalg_complex_cholesky_svx;
149*gsl_linalg_complex_cholesky_invert = *Math::GSL::Linalgc::gsl_linalg_complex_cholesky_invert;
150*gsl_linalg_symmtd_decomp = *Math::GSL::Linalgc::gsl_linalg_symmtd_decomp;
151*gsl_linalg_symmtd_unpack = *Math::GSL::Linalgc::gsl_linalg_symmtd_unpack;
152*gsl_linalg_symmtd_unpack_T = *Math::GSL::Linalgc::gsl_linalg_symmtd_unpack_T;
153*gsl_linalg_hermtd_decomp = *Math::GSL::Linalgc::gsl_linalg_hermtd_decomp;
154*gsl_linalg_hermtd_unpack = *Math::GSL::Linalgc::gsl_linalg_hermtd_unpack;
155*gsl_linalg_hermtd_unpack_T = *Math::GSL::Linalgc::gsl_linalg_hermtd_unpack_T;
156*gsl_linalg_HH_solve = *Math::GSL::Linalgc::gsl_linalg_HH_solve;
157*gsl_linalg_HH_svx = *Math::GSL::Linalgc::gsl_linalg_HH_svx;
158*gsl_linalg_solve_symm_tridiag = *Math::GSL::Linalgc::gsl_linalg_solve_symm_tridiag;
159*gsl_linalg_solve_tridiag = *Math::GSL::Linalgc::gsl_linalg_solve_tridiag;
160*gsl_linalg_solve_symm_cyc_tridiag = *Math::GSL::Linalgc::gsl_linalg_solve_symm_cyc_tridiag;
161*gsl_linalg_solve_cyc_tridiag = *Math::GSL::Linalgc::gsl_linalg_solve_cyc_tridiag;
162*gsl_linalg_bidiag_decomp = *Math::GSL::Linalgc::gsl_linalg_bidiag_decomp;
163*gsl_linalg_bidiag_unpack = *Math::GSL::Linalgc::gsl_linalg_bidiag_unpack;
164*gsl_linalg_bidiag_unpack2 = *Math::GSL::Linalgc::gsl_linalg_bidiag_unpack2;
165*gsl_linalg_bidiag_unpack_B = *Math::GSL::Linalgc::gsl_linalg_bidiag_unpack_B;
166*gsl_linalg_balance_matrix = *Math::GSL::Linalgc::gsl_linalg_balance_matrix;
167*gsl_linalg_balance_accum = *Math::GSL::Linalgc::gsl_linalg_balance_accum;
168*gsl_linalg_balance_columns = *Math::GSL::Linalgc::gsl_linalg_balance_columns;
169*gsl_linalg_givens = *Math::GSL::Linalgc::gsl_linalg_givens;
170*gsl_linalg_givens_gv = *Math::GSL::Linalgc::gsl_linalg_givens_gv;
171*gsl_permutation_alloc = *Math::GSL::Linalgc::gsl_permutation_alloc;
172*gsl_permutation_calloc = *Math::GSL::Linalgc::gsl_permutation_calloc;
173*gsl_permutation_init = *Math::GSL::Linalgc::gsl_permutation_init;
174*gsl_permutation_free = *Math::GSL::Linalgc::gsl_permutation_free;
175*gsl_permutation_memcpy = *Math::GSL::Linalgc::gsl_permutation_memcpy;
176*gsl_permutation_fread = *Math::GSL::Linalgc::gsl_permutation_fread;
177*gsl_permutation_fwrite = *Math::GSL::Linalgc::gsl_permutation_fwrite;
178*gsl_permutation_fscanf = *Math::GSL::Linalgc::gsl_permutation_fscanf;
179*gsl_permutation_fprintf = *Math::GSL::Linalgc::gsl_permutation_fprintf;
180*gsl_permutation_size = *Math::GSL::Linalgc::gsl_permutation_size;
181*gsl_permutation_data = *Math::GSL::Linalgc::gsl_permutation_data;
182*gsl_permutation_swap = *Math::GSL::Linalgc::gsl_permutation_swap;
183*gsl_permutation_valid = *Math::GSL::Linalgc::gsl_permutation_valid;
184*gsl_permutation_reverse = *Math::GSL::Linalgc::gsl_permutation_reverse;
185*gsl_permutation_inverse = *Math::GSL::Linalgc::gsl_permutation_inverse;
186*gsl_permutation_next = *Math::GSL::Linalgc::gsl_permutation_next;
187*gsl_permutation_prev = *Math::GSL::Linalgc::gsl_permutation_prev;
188*gsl_permutation_mul = *Math::GSL::Linalgc::gsl_permutation_mul;
189*gsl_permutation_linear_to_canonical = *Math::GSL::Linalgc::gsl_permutation_linear_to_canonical;
190*gsl_permutation_canonical_to_linear = *Math::GSL::Linalgc::gsl_permutation_canonical_to_linear;
191*gsl_permutation_inversions = *Math::GSL::Linalgc::gsl_permutation_inversions;
192*gsl_permutation_linear_cycles = *Math::GSL::Linalgc::gsl_permutation_linear_cycles;
193*gsl_permutation_canonical_cycles = *Math::GSL::Linalgc::gsl_permutation_canonical_cycles;
194*gsl_permutation_get = *Math::GSL::Linalgc::gsl_permutation_get;
195*gsl_complex_polar = *Math::GSL::Linalgc::gsl_complex_polar;
196*gsl_complex_rect = *Math::GSL::Linalgc::gsl_complex_rect;
197*gsl_complex_arg = *Math::GSL::Linalgc::gsl_complex_arg;
198*gsl_complex_abs = *Math::GSL::Linalgc::gsl_complex_abs;
199*gsl_complex_abs2 = *Math::GSL::Linalgc::gsl_complex_abs2;
200*gsl_complex_logabs = *Math::GSL::Linalgc::gsl_complex_logabs;
201*gsl_complex_add = *Math::GSL::Linalgc::gsl_complex_add;
202*gsl_complex_sub = *Math::GSL::Linalgc::gsl_complex_sub;
203*gsl_complex_mul = *Math::GSL::Linalgc::gsl_complex_mul;
204*gsl_complex_div = *Math::GSL::Linalgc::gsl_complex_div;
205*gsl_complex_add_real = *Math::GSL::Linalgc::gsl_complex_add_real;
206*gsl_complex_sub_real = *Math::GSL::Linalgc::gsl_complex_sub_real;
207*gsl_complex_mul_real = *Math::GSL::Linalgc::gsl_complex_mul_real;
208*gsl_complex_div_real = *Math::GSL::Linalgc::gsl_complex_div_real;
209*gsl_complex_add_imag = *Math::GSL::Linalgc::gsl_complex_add_imag;
210*gsl_complex_sub_imag = *Math::GSL::Linalgc::gsl_complex_sub_imag;
211*gsl_complex_mul_imag = *Math::GSL::Linalgc::gsl_complex_mul_imag;
212*gsl_complex_div_imag = *Math::GSL::Linalgc::gsl_complex_div_imag;
213*gsl_complex_conjugate = *Math::GSL::Linalgc::gsl_complex_conjugate;
214*gsl_complex_inverse = *Math::GSL::Linalgc::gsl_complex_inverse;
215*gsl_complex_negative = *Math::GSL::Linalgc::gsl_complex_negative;
216*gsl_complex_sqrt = *Math::GSL::Linalgc::gsl_complex_sqrt;
217*gsl_complex_sqrt_real = *Math::GSL::Linalgc::gsl_complex_sqrt_real;
218*gsl_complex_pow = *Math::GSL::Linalgc::gsl_complex_pow;
219*gsl_complex_pow_real = *Math::GSL::Linalgc::gsl_complex_pow_real;
220*gsl_complex_exp = *Math::GSL::Linalgc::gsl_complex_exp;
221*gsl_complex_log = *Math::GSL::Linalgc::gsl_complex_log;
222*gsl_complex_log10 = *Math::GSL::Linalgc::gsl_complex_log10;
223*gsl_complex_log_b = *Math::GSL::Linalgc::gsl_complex_log_b;
224*gsl_complex_sin = *Math::GSL::Linalgc::gsl_complex_sin;
225*gsl_complex_cos = *Math::GSL::Linalgc::gsl_complex_cos;
226*gsl_complex_sec = *Math::GSL::Linalgc::gsl_complex_sec;
227*gsl_complex_csc = *Math::GSL::Linalgc::gsl_complex_csc;
228*gsl_complex_tan = *Math::GSL::Linalgc::gsl_complex_tan;
229*gsl_complex_cot = *Math::GSL::Linalgc::gsl_complex_cot;
230*gsl_complex_arcsin = *Math::GSL::Linalgc::gsl_complex_arcsin;
231*gsl_complex_arcsin_real = *Math::GSL::Linalgc::gsl_complex_arcsin_real;
232*gsl_complex_arccos = *Math::GSL::Linalgc::gsl_complex_arccos;
233*gsl_complex_arccos_real = *Math::GSL::Linalgc::gsl_complex_arccos_real;
234*gsl_complex_arcsec = *Math::GSL::Linalgc::gsl_complex_arcsec;
235*gsl_complex_arcsec_real = *Math::GSL::Linalgc::gsl_complex_arcsec_real;
236*gsl_complex_arccsc = *Math::GSL::Linalgc::gsl_complex_arccsc;
237*gsl_complex_arccsc_real = *Math::GSL::Linalgc::gsl_complex_arccsc_real;
238*gsl_complex_arctan = *Math::GSL::Linalgc::gsl_complex_arctan;
239*gsl_complex_arccot = *Math::GSL::Linalgc::gsl_complex_arccot;
240*gsl_complex_sinh = *Math::GSL::Linalgc::gsl_complex_sinh;
241*gsl_complex_cosh = *Math::GSL::Linalgc::gsl_complex_cosh;
242*gsl_complex_sech = *Math::GSL::Linalgc::gsl_complex_sech;
243*gsl_complex_csch = *Math::GSL::Linalgc::gsl_complex_csch;
244*gsl_complex_tanh = *Math::GSL::Linalgc::gsl_complex_tanh;
245*gsl_complex_coth = *Math::GSL::Linalgc::gsl_complex_coth;
246*gsl_complex_arcsinh = *Math::GSL::Linalgc::gsl_complex_arcsinh;
247*gsl_complex_arccosh = *Math::GSL::Linalgc::gsl_complex_arccosh;
248*gsl_complex_arccosh_real = *Math::GSL::Linalgc::gsl_complex_arccosh_real;
249*gsl_complex_arcsech = *Math::GSL::Linalgc::gsl_complex_arcsech;
250*gsl_complex_arccsch = *Math::GSL::Linalgc::gsl_complex_arccsch;
251*gsl_complex_arctanh = *Math::GSL::Linalgc::gsl_complex_arctanh;
252*gsl_complex_arctanh_real = *Math::GSL::Linalgc::gsl_complex_arctanh_real;
253*gsl_complex_arccoth = *Math::GSL::Linalgc::gsl_complex_arccoth;
254
255############# Class : Math::GSL::Linalg::gsl_permutation_struct ##############
256
257package Math::GSL::Linalg::gsl_permutation_struct;
258use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
259@ISA = qw( Math::GSL::Linalg );
260%OWNER = ();
261%ITERATORS = ();
262*swig_size_get = *Math::GSL::Linalgc::gsl_permutation_struct_size_get;
263*swig_size_set = *Math::GSL::Linalgc::gsl_permutation_struct_size_set;
264*swig_data_get = *Math::GSL::Linalgc::gsl_permutation_struct_data_get;
265*swig_data_set = *Math::GSL::Linalgc::gsl_permutation_struct_data_set;
266sub new {
267    my $pkg = shift;
268    my $self = Math::GSL::Linalgc::new_gsl_permutation_struct(@_);
269    bless $self, $pkg if defined($self);
270}
271
272sub DESTROY {
273    return unless $_[0]->isa('HASH');
274    my $self = tied(%{$_[0]});
275    return unless defined $self;
276    delete $ITERATORS{$self};
277    if (exists $OWNER{$self}) {
278        Math::GSL::Linalgc::delete_gsl_permutation_struct($self);
279        delete $OWNER{$self};
280    }
281}
282
283sub DISOWN {
284    my $self = shift;
285    my $ptr = tied(%$self);
286    delete $OWNER{$ptr};
287}
288
289sub ACQUIRE {
290    my $self = shift;
291    my $ptr = tied(%$self);
292    $OWNER{$ptr} = 1;
293}
294
295
296############# Class : Math::GSL::Linalg::gsl_complex ##############
297
298package Math::GSL::Linalg::gsl_complex;
299use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
300@ISA = qw( Math::GSL::Linalg );
301%OWNER = ();
302%ITERATORS = ();
303*swig_dat_get = *Math::GSL::Linalgc::gsl_complex_dat_get;
304*swig_dat_set = *Math::GSL::Linalgc::gsl_complex_dat_set;
305sub new {
306    my $pkg = shift;
307    my $self = Math::GSL::Linalgc::new_gsl_complex(@_);
308    bless $self, $pkg if defined($self);
309}
310
311sub DESTROY {
312    return unless $_[0]->isa('HASH');
313    my $self = tied(%{$_[0]});
314    return unless defined $self;
315    delete $ITERATORS{$self};
316    if (exists $OWNER{$self}) {
317        Math::GSL::Linalgc::delete_gsl_complex($self);
318        delete $OWNER{$self};
319    }
320}
321
322sub DISOWN {
323    my $self = shift;
324    my $ptr = tied(%$self);
325    delete $OWNER{$ptr};
326}
327
328sub ACQUIRE {
329    my $self = shift;
330    my $ptr = tied(%$self);
331    $OWNER{$ptr} = 1;
332}
333
334
335############# Class : Math::GSL::Linalg::gsl_complex_long_double ##############
336
337package Math::GSL::Linalg::gsl_complex_long_double;
338use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
339@ISA = qw( Math::GSL::Linalg );
340%OWNER = ();
341%ITERATORS = ();
342*swig_dat_get = *Math::GSL::Linalgc::gsl_complex_long_double_dat_get;
343*swig_dat_set = *Math::GSL::Linalgc::gsl_complex_long_double_dat_set;
344sub new {
345    my $pkg = shift;
346    my $self = Math::GSL::Linalgc::new_gsl_complex_long_double(@_);
347    bless $self, $pkg if defined($self);
348}
349
350sub DESTROY {
351    return unless $_[0]->isa('HASH');
352    my $self = tied(%{$_[0]});
353    return unless defined $self;
354    delete $ITERATORS{$self};
355    if (exists $OWNER{$self}) {
356        Math::GSL::Linalgc::delete_gsl_complex_long_double($self);
357        delete $OWNER{$self};
358    }
359}
360
361sub DISOWN {
362    my $self = shift;
363    my $ptr = tied(%$self);
364    delete $OWNER{$ptr};
365}
366
367sub ACQUIRE {
368    my $self = shift;
369    my $ptr = tied(%$self);
370    $OWNER{$ptr} = 1;
371}
372
373
374############# Class : Math::GSL::Linalg::gsl_complex_float ##############
375
376package Math::GSL::Linalg::gsl_complex_float;
377use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
378@ISA = qw( Math::GSL::Linalg );
379%OWNER = ();
380%ITERATORS = ();
381*swig_dat_get = *Math::GSL::Linalgc::gsl_complex_float_dat_get;
382*swig_dat_set = *Math::GSL::Linalgc::gsl_complex_float_dat_set;
383sub new {
384    my $pkg = shift;
385    my $self = Math::GSL::Linalgc::new_gsl_complex_float(@_);
386    bless $self, $pkg if defined($self);
387}
388
389sub DESTROY {
390    return unless $_[0]->isa('HASH');
391    my $self = tied(%{$_[0]});
392    return unless defined $self;
393    delete $ITERATORS{$self};
394    if (exists $OWNER{$self}) {
395        Math::GSL::Linalgc::delete_gsl_complex_float($self);
396        delete $OWNER{$self};
397    }
398}
399
400sub DISOWN {
401    my $self = shift;
402    my $ptr = tied(%$self);
403    delete $OWNER{$ptr};
404}
405
406sub ACQUIRE {
407    my $self = shift;
408    my $ptr = tied(%$self);
409    $OWNER{$ptr} = 1;
410}
411
412
413# ------- VARIABLE STUBS --------
414
415package Math::GSL::Linalg;
416
417*GSL_VERSION = *Math::GSL::Linalgc::GSL_VERSION;
418*GSL_MAJOR_VERSION = *Math::GSL::Linalgc::GSL_MAJOR_VERSION;
419*GSL_MINOR_VERSION = *Math::GSL::Linalgc::GSL_MINOR_VERSION;
420*GSL_POSZERO = *Math::GSL::Linalgc::GSL_POSZERO;
421*GSL_NEGZERO = *Math::GSL::Linalgc::GSL_NEGZERO;
422*GSL_SUCCESS = *Math::GSL::Linalgc::GSL_SUCCESS;
423*GSL_FAILURE = *Math::GSL::Linalgc::GSL_FAILURE;
424*GSL_CONTINUE = *Math::GSL::Linalgc::GSL_CONTINUE;
425*GSL_EDOM = *Math::GSL::Linalgc::GSL_EDOM;
426*GSL_ERANGE = *Math::GSL::Linalgc::GSL_ERANGE;
427*GSL_EFAULT = *Math::GSL::Linalgc::GSL_EFAULT;
428*GSL_EINVAL = *Math::GSL::Linalgc::GSL_EINVAL;
429*GSL_EFAILED = *Math::GSL::Linalgc::GSL_EFAILED;
430*GSL_EFACTOR = *Math::GSL::Linalgc::GSL_EFACTOR;
431*GSL_ESANITY = *Math::GSL::Linalgc::GSL_ESANITY;
432*GSL_ENOMEM = *Math::GSL::Linalgc::GSL_ENOMEM;
433*GSL_EBADFUNC = *Math::GSL::Linalgc::GSL_EBADFUNC;
434*GSL_ERUNAWAY = *Math::GSL::Linalgc::GSL_ERUNAWAY;
435*GSL_EMAXITER = *Math::GSL::Linalgc::GSL_EMAXITER;
436*GSL_EZERODIV = *Math::GSL::Linalgc::GSL_EZERODIV;
437*GSL_EBADTOL = *Math::GSL::Linalgc::GSL_EBADTOL;
438*GSL_ETOL = *Math::GSL::Linalgc::GSL_ETOL;
439*GSL_EUNDRFLW = *Math::GSL::Linalgc::GSL_EUNDRFLW;
440*GSL_EOVRFLW = *Math::GSL::Linalgc::GSL_EOVRFLW;
441*GSL_ELOSS = *Math::GSL::Linalgc::GSL_ELOSS;
442*GSL_EROUND = *Math::GSL::Linalgc::GSL_EROUND;
443*GSL_EBADLEN = *Math::GSL::Linalgc::GSL_EBADLEN;
444*GSL_ENOTSQR = *Math::GSL::Linalgc::GSL_ENOTSQR;
445*GSL_ESING = *Math::GSL::Linalgc::GSL_ESING;
446*GSL_EDIVERGE = *Math::GSL::Linalgc::GSL_EDIVERGE;
447*GSL_EUNSUP = *Math::GSL::Linalgc::GSL_EUNSUP;
448*GSL_EUNIMPL = *Math::GSL::Linalgc::GSL_EUNIMPL;
449*GSL_ECACHE = *Math::GSL::Linalgc::GSL_ECACHE;
450*GSL_ETABLE = *Math::GSL::Linalgc::GSL_ETABLE;
451*GSL_ENOPROG = *Math::GSL::Linalgc::GSL_ENOPROG;
452*GSL_ENOPROGJ = *Math::GSL::Linalgc::GSL_ENOPROGJ;
453*GSL_ETOLF = *Math::GSL::Linalgc::GSL_ETOLF;
454*GSL_ETOLX = *Math::GSL::Linalgc::GSL_ETOLX;
455*GSL_ETOLG = *Math::GSL::Linalgc::GSL_ETOLG;
456*GSL_EOF = *Math::GSL::Linalgc::GSL_EOF;
457*GSL_LINALG_MOD_NONE = *Math::GSL::Linalgc::GSL_LINALG_MOD_NONE;
458*GSL_LINALG_MOD_TRANSPOSE = *Math::GSL::Linalgc::GSL_LINALG_MOD_TRANSPOSE;
459*GSL_LINALG_MOD_CONJUGATE = *Math::GSL::Linalgc::GSL_LINALG_MOD_CONJUGATE;
460
461@EXPORT_OK = qw/$GSL_LINALG_MOD_NONE $GSL_LINALG_MOD_TRANSPOSE $GSL_LINALG_MOD_CONJUGATE
462                gsl_linalg_matmult gsl_linalg_matmult_mod
463                gsl_linalg_exponential_ss
464                gsl_linalg_householder_transform
465                gsl_linalg_complex_householder_transform
466                gsl_linalg_householder_hm
467                gsl_linalg_householder_mh
468                gsl_linalg_householder_hv
469                gsl_linalg_householder_hm1
470                gsl_linalg_complex_householder_hm
471                gsl_linalg_complex_householder_mh
472                gsl_linalg_complex_householder_hv
473                gsl_linalg_hessenberg_decomp
474                gsl_linalg_hessenberg_unpack
475                gsl_linalg_hessenberg_unpack_accum
476                gsl_linalg_hessenberg_set_zero
477                gsl_linalg_hessenberg_submatrix
478                gsl_linalg_hessenberg
479                gsl_linalg_hesstri_decomp
480                gsl_linalg_SV_decomp
481                gsl_linalg_SV_decomp_mod
482                gsl_linalg_SV_decomp_jacobi
483                gsl_linalg_SV_solve
484                gsl_linalg_LU_decomp
485                gsl_linalg_LU_solve
486                gsl_linalg_LU_svx
487                gsl_linalg_LU_refine
488                gsl_linalg_LU_invert
489                gsl_linalg_LU_det
490                gsl_linalg_LU_lndet
491                gsl_linalg_LU_sgndet
492                gsl_linalg_complex_LU_decomp
493                gsl_linalg_complex_LU_solve
494                gsl_linalg_complex_LU_svx
495                gsl_linalg_complex_LU_refine
496                gsl_linalg_complex_LU_invert
497                gsl_linalg_complex_LU_det
498                gsl_linalg_complex_LU_lndet
499                gsl_linalg_complex_LU_sgndet
500                gsl_linalg_QR_decomp
501                gsl_linalg_QR_solve
502                gsl_linalg_QR_svx
503                gsl_linalg_QR_lssolve
504                gsl_linalg_QR_QRsolve
505                gsl_linalg_QR_Rsolve
506                gsl_linalg_QR_Rsvx
507                gsl_linalg_QR_update
508                gsl_linalg_QR_QTvec
509                gsl_linalg_QR_Qvec
510                gsl_linalg_QR_QTmat
511                gsl_linalg_QR_unpack
512                gsl_linalg_R_solve
513                gsl_linalg_R_svx
514                gsl_linalg_QRPT_decomp
515                gsl_linalg_QRPT_decomp2
516                gsl_linalg_QRPT_solve
517                gsl_linalg_QRPT_svx
518                gsl_linalg_QRPT_QRsolve
519                gsl_linalg_QRPT_Rsolve
520                gsl_linalg_QRPT_Rsvx
521                gsl_linalg_QRPT_update
522                gsl_linalg_LQ_decomp
523                gsl_linalg_LQ_solve_T
524                gsl_linalg_LQ_svx_T
525                gsl_linalg_LQ_lssolve_T
526                gsl_linalg_LQ_Lsolve_T
527                gsl_linalg_LQ_Lsvx_T
528                gsl_linalg_L_solve_T
529                gsl_linalg_LQ_vecQ
530                gsl_linalg_LQ_vecQT
531                gsl_linalg_LQ_unpack
532                gsl_linalg_LQ_update
533                gsl_linalg_LQ_LQsolve
534                gsl_linalg_PTLQ_decomp
535                gsl_linalg_PTLQ_decomp2
536                gsl_linalg_PTLQ_solve_T
537                gsl_linalg_PTLQ_svx_T
538                gsl_linalg_PTLQ_LQsolve_T
539                gsl_linalg_PTLQ_Lsolve_T
540                gsl_linalg_PTLQ_Lsvx_T
541                gsl_linalg_PTLQ_update
542                gsl_linalg_cholesky_decomp
543                gsl_linalg_cholesky_solve
544                gsl_linalg_cholesky_svx
545                gsl_linalg_cholesky_decomp_unit
546                gsl_linalg_complex_cholesky_decomp
547                gsl_linalg_complex_cholesky_solve
548                gsl_linalg_complex_cholesky_svx
549                gsl_linalg_symmtd_decomp
550                gsl_linalg_symmtd_unpack
551                gsl_linalg_symmtd_unpack_T
552                gsl_linalg_hermtd_decomp
553                gsl_linalg_hermtd_unpack
554                gsl_linalg_hermtd_unpack_T
555                gsl_linalg_HH_solve
556                gsl_linalg_HH_svx
557                gsl_linalg_solve_symm_tridiag
558                gsl_linalg_solve_tridiag
559                gsl_linalg_solve_symm_cyc_tridiag
560                gsl_linalg_solve_cyc_tridiag
561                gsl_linalg_bidiag_decomp
562                gsl_linalg_bidiag_unpack
563                gsl_linalg_bidiag_unpack2
564                gsl_linalg_bidiag_unpack_B
565                gsl_linalg_balance_matrix
566                gsl_linalg_balance_accum
567                gsl_linalg_balance_columns
568                gsl_linalg_givens gsl_linalg_givens_gv
569       /;
570%EXPORT_TAGS = ( all =>[ @EXPORT_OK ] );
571
572__END__
573
574=encoding utf8
575
576=head1 NAME
577
578Math::GSL::Linalg - Functions for solving linear systems
579
580=head1 SYNOPSIS
581
582    use Math::GSL::Linalg qw/:all/;
583
584=head1 DESCRIPTION
585
586
587Here is a list of all the functions included in this module :
588
589=over
590
591=item gsl_linalg_matmult
592
593=item gsl_linalg_matmult_mod
594
595=item gsl_linalg_exponential_ss
596
597=item gsl_linalg_householder_transform
598
599=item gsl_linalg_complex_householder_transform
600
601=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.
602
603=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.
604
605=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.
606
607=item gsl_linalg_householder_hm1
608
609=item gsl_linalg_givens($a,$b,$c,$s)
610
611Performs a Givens rotation on the vector ($a,$b) and stores the answer in $c and $s.
612
613=item gsl_linalg_givens_gv($v, $i,$j, $c, $s)
614
615Performs a Givens rotation on the $i and $j-th elements of $v, storing them in $c and $s.
616
617=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.
618
619=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.
620
621=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.
622
623=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.
624
625=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.
626
627=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.
628
629=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.
630
631=item gsl_linalg_hessenberg_submatrix
632
633=item gsl_linalg_hessenberg
634
635=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.
636
637=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.
638
639=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.
640
641=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.
642
643=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.
644
645=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.
646
647=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.
648
649=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.
650
651=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.
652
653=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.
654
655=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.
656
657=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.
658
659=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.
660
661=item gsl_linalg_complex_LU_decomp($A, $p) - Does the same operation than gsl_linalg_LU_decomp but on the complex matrix $A.
662
663=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.
664
665=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.
666
667=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.
668
669=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.
670
671=item gsl_linalg_complex_LU_det($LU, $signum) - Does the same operation than gsl_linalg_LU_det but on the complex matrix $LU.
672
673=item gsl_linalg_complex_LU_lndet($LU) - Does the same operation than gsl_linalg_LU_det but on the complex matrix $LU.
674
675=item gsl_linalg_complex_LU_sgndet($LU, $signum) - Does the same operation than gsl_linalg_LU_sgndet but on the complex matrix $LU.
676
677=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).
678
679=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.
680
681=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.
682
683=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.
684
685=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.
686
687=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.
688
689=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.
690
691=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.
692
693=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.
694
695=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.
696
697=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.
698
699=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.
700
701=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.
702
703=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.
704
705=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).
706
707=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
708
709=item gsl_linalg_QRPT_solve
710
711=item gsl_linalg_QRPT_svx
712
713=item gsl_linalg_QRPT_QRsolve
714
715=item gsl_linalg_QRPT_Rsolve
716
717=item gsl_linalg_QRPT_Rsvx
718
719=item gsl_linalg_QRPT_update
720
721=item gsl_linalg_LQ_decomp
722
723=item gsl_linalg_LQ_solve_T
724
725=item gsl_linalg_LQ_svx_T
726
727=item gsl_linalg_LQ_lssolve_T
728
729=item gsl_linalg_LQ_Lsolve_T
730
731=item gsl_linalg_LQ_Lsvx_T
732
733=item gsl_linalg_L_solve_T
734
735=item gsl_linalg_LQ_vecQ
736
737=item gsl_linalg_LQ_vecQT
738
739=item gsl_linalg_LQ_unpack
740
741=item gsl_linalg_LQ_update
742
743=item gsl_linalg_LQ_LQsolve
744
745=item gsl_linalg_PTLQ_decomp
746
747=item gsl_linalg_PTLQ_decomp2
748
749=item gsl_linalg_PTLQ_solve_T
750
751=item gsl_linalg_PTLQ_svx_T
752
753=item gsl_linalg_PTLQ_LQsolve_T
754
755=item gsl_linalg_PTLQ_Lsolve_T
756
757=item gsl_linalg_PTLQ_Lsvx_T
758
759=item gsl_linalg_PTLQ_update
760
761=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.
762
763=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.
764
765=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.
766
767=item gsl_linalg_cholesky_decomp_unit
768
769=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.
770
771=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.
772
773=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.
774
775=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.
776
777=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.
778
779=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.
780
781=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.
782
783=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.
784
785=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.
786
787=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.
788
789=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.
790
791=item gsl_linalg_solve_symm_tridiag
792
793=item gsl_linalg_solve_tridiag
794
795=item gsl_linalg_solve_symm_cyc_tridiag
796
797=item gsl_linalg_solve_cyc_tridiag
798
799=item gsl_linalg_bidiag_decomp
800
801=item gsl_linalg_bidiag_unpack
802
803=item gsl_linalg_bidiag_unpack2
804
805=item gsl_linalg_bidiag_unpack_B
806
807=item gsl_linalg_balance_matrix
808
809=item gsl_linalg_balance_accum
810
811=item gsl_linalg_balance_columns
812
813
814 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.
815
816For more informations on the functions, we refer you to the GSL official documentation: L<http://www.gnu.org/software/gsl/manual/html_node/>
817
818
819=back
820
821=head1 EXAMPLES
822
823This example shows how to compute the determinant of a matrix with the LU decomposition:
824
825 use Math::GSL::Matrix qw/:all/;
826 use Math::GSL::Permutation qw/:all/;
827 use Math::GSL::Linalg qw/:all/;
828
829 my $Matrix = gsl_matrix_alloc(4,4);
830 map { gsl_matrix_set($Matrix, 0, $_, $_+1) } (0..3);
831
832 gsl_matrix_set($Matrix,1, 0, 2);
833 gsl_matrix_set($Matrix, 1, 1, 3);
834 gsl_matrix_set($Matrix, 1, 2, 4);
835 gsl_matrix_set($Matrix, 1, 3, 1);
836
837 gsl_matrix_set($Matrix, 2, 0, 3);
838 gsl_matrix_set($Matrix, 2, 1, 4);
839 gsl_matrix_set($Matrix, 2, 2, 1);
840 gsl_matrix_set($Matrix, 2, 3, 2);
841
842 gsl_matrix_set($Matrix, 3, 0, 4);
843 gsl_matrix_set($Matrix, 3, 1, 1);
844 gsl_matrix_set($Matrix, 3, 2, 2);
845 gsl_matrix_set($Matrix, 3, 3, 3);
846
847 my $permutation = gsl_permutation_alloc(4);
848 gsl_permutation_init($permutation);
849 my ($result, $signum) = gsl_linalg_LU_decomp($Matrix, $permutation);
850 my $det = gsl_linalg_LU_det($Matrix, $signum);
851 print "The value of the determinant of the matrix is $det \n";
852
853=head1 AUTHORS
854
855Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
856
857=head1 COPYRIGHT AND LICENSE
858
859Copyright (C) 2008-2021 Jonathan "Duke" Leto and Thierry Moisan
860
861This program is free software; you can redistribute it and/or modify it
862under the same terms as Perl itself.
863
864=cut
8651;
866