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