| Math-GSL documentation | Contained in the Math-GSL distribution. |
Math::GSL::Linalg - Functions for solving linear systems
use Math::GSL::Linalg qw/:all/;
Here is a list of all the functions included in this module :
You have to add the functions you want to use inside the qw /put_funtion_here / with spaces between each function. You can also write use Math::GSL::Complex qw/:all/ to use all avaible functions of the module.
For more informations on the functions, we refer you to the GSL offcial documentation: http://www.gnu.org/software/gsl/manual/html_node/ Tip : search on google: site:http://www.gnu.org/software/gsl/manual/html_node/ name_of_the_function_you_want
This example shows how to compute the determinant of a matrix with the LU decomposition:
use Math::GSL::Matrix qw/:all/;
use Math::GSL::Permutation qw/:all/;
use Math::GSL::Linalg qw/:all/;
my $Matrix = gsl_matrix_alloc(4,4);
map { gsl_matrix_set($Matrix, 0, $_, $_+1) } (0..3);
gsl_matrix_set($Matrix,1, 0, 2);
gsl_matrix_set($Matrix, 1, 1, 3);
gsl_matrix_set($Matrix, 1, 2, 4);
gsl_matrix_set($Matrix, 1, 3, 1);
gsl_matrix_set($Matrix, 2, 0, 3);
gsl_matrix_set($Matrix, 2, 1, 4);
gsl_matrix_set($Matrix, 2, 2, 1);
gsl_matrix_set($Matrix, 2, 3, 2);
gsl_matrix_set($Matrix, 3, 0, 4);
gsl_matrix_set($Matrix, 3, 1, 1);
gsl_matrix_set($Matrix, 3, 2, 2);
gsl_matrix_set($Matrix, 3, 3, 3);
my $permutation = gsl_permutation_alloc(4);
gsl_permutation_init($permutation);
my ($result, $signum) = gsl_linalg_LU_decomp($Matrix, $permutation);
my $det = gsl_linalg_LU_det($Matrix, $signum);
print "The value of the determinant of the matrix is $det \n";
Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
Copyright (C) 2008-2009 Jonathan Leto and Thierry Moisan
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Math-GSL documentation | Contained in the Math-GSL distribution. |
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.40 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. package Math::GSL::Linalg; use base qw(Exporter); use base qw(DynaLoader); package Math::GSL::Linalgc; bootstrap Math::GSL::Linalg; package Math::GSL::Linalg; @EXPORT = qw(); # ---------- BASE METHODS ------------- package Math::GSL::Linalg; sub TIEHASH { my ($classname,$obj) = @_; return bless $obj, $classname; } sub CLEAR { } sub FIRSTKEY { } sub NEXTKEY { } sub FETCH { my ($self,$field) = @_; my $member_func = "swig_${field}_get"; $self->$member_func(); } sub STORE { my ($self,$field,$newval) = @_; my $member_func = "swig_${field}_set"; $self->$member_func($newval); } sub this { my $ptr = shift; return tied(%$ptr); } # ------- FUNCTION WRAPPERS -------- package Math::GSL::Linalg; *gsl_linalg_matmult = *Math::GSL::Linalgc::gsl_linalg_matmult; *gsl_linalg_matmult_mod = *Math::GSL::Linalgc::gsl_linalg_matmult_mod; *gsl_linalg_exponential_ss = *Math::GSL::Linalgc::gsl_linalg_exponential_ss; *gsl_linalg_householder_transform = *Math::GSL::Linalgc::gsl_linalg_householder_transform; *gsl_linalg_complex_householder_transform = *Math::GSL::Linalgc::gsl_linalg_complex_householder_transform; *gsl_linalg_householder_hm = *Math::GSL::Linalgc::gsl_linalg_householder_hm; *gsl_linalg_householder_mh = *Math::GSL::Linalgc::gsl_linalg_householder_mh; *gsl_linalg_householder_hv = *Math::GSL::Linalgc::gsl_linalg_householder_hv; *gsl_linalg_householder_hm1 = *Math::GSL::Linalgc::gsl_linalg_householder_hm1; *gsl_linalg_complex_householder_hm = *Math::GSL::Linalgc::gsl_linalg_complex_householder_hm; *gsl_linalg_complex_householder_mh = *Math::GSL::Linalgc::gsl_linalg_complex_householder_mh; *gsl_linalg_complex_householder_hv = *Math::GSL::Linalgc::gsl_linalg_complex_householder_hv; *gsl_linalg_hessenberg_decomp = *Math::GSL::Linalgc::gsl_linalg_hessenberg_decomp; *gsl_linalg_hessenberg_unpack = *Math::GSL::Linalgc::gsl_linalg_hessenberg_unpack; *gsl_linalg_hessenberg_unpack_accum = *Math::GSL::Linalgc::gsl_linalg_hessenberg_unpack_accum; *gsl_linalg_hessenberg_set_zero = *Math::GSL::Linalgc::gsl_linalg_hessenberg_set_zero; *gsl_linalg_hessenberg_submatrix = *Math::GSL::Linalgc::gsl_linalg_hessenberg_submatrix; *gsl_linalg_hessenberg = *Math::GSL::Linalgc::gsl_linalg_hessenberg; *gsl_linalg_hesstri_decomp = *Math::GSL::Linalgc::gsl_linalg_hesstri_decomp; *gsl_linalg_SV_decomp = *Math::GSL::Linalgc::gsl_linalg_SV_decomp; *gsl_linalg_SV_decomp_mod = *Math::GSL::Linalgc::gsl_linalg_SV_decomp_mod; *gsl_linalg_SV_decomp_jacobi = *Math::GSL::Linalgc::gsl_linalg_SV_decomp_jacobi; *gsl_linalg_SV_solve = *Math::GSL::Linalgc::gsl_linalg_SV_solve; *gsl_linalg_LU_decomp = *Math::GSL::Linalgc::gsl_linalg_LU_decomp; *gsl_linalg_LU_solve = *Math::GSL::Linalgc::gsl_linalg_LU_solve; *gsl_linalg_LU_svx = *Math::GSL::Linalgc::gsl_linalg_LU_svx; *gsl_linalg_LU_refine = *Math::GSL::Linalgc::gsl_linalg_LU_refine; *gsl_linalg_LU_invert = *Math::GSL::Linalgc::gsl_linalg_LU_invert; *gsl_linalg_LU_det = *Math::GSL::Linalgc::gsl_linalg_LU_det; *gsl_linalg_LU_lndet = *Math::GSL::Linalgc::gsl_linalg_LU_lndet; *gsl_linalg_LU_sgndet = *Math::GSL::Linalgc::gsl_linalg_LU_sgndet; *gsl_linalg_complex_LU_decomp = *Math::GSL::Linalgc::gsl_linalg_complex_LU_decomp; *gsl_linalg_complex_LU_solve = *Math::GSL::Linalgc::gsl_linalg_complex_LU_solve; *gsl_linalg_complex_LU_svx = *Math::GSL::Linalgc::gsl_linalg_complex_LU_svx; *gsl_linalg_complex_LU_refine = *Math::GSL::Linalgc::gsl_linalg_complex_LU_refine; *gsl_linalg_complex_LU_invert = *Math::GSL::Linalgc::gsl_linalg_complex_LU_invert; *gsl_linalg_complex_LU_det = *Math::GSL::Linalgc::gsl_linalg_complex_LU_det; *gsl_linalg_complex_LU_lndet = *Math::GSL::Linalgc::gsl_linalg_complex_LU_lndet; *gsl_linalg_complex_LU_sgndet = *Math::GSL::Linalgc::gsl_linalg_complex_LU_sgndet; *gsl_linalg_QR_decomp = *Math::GSL::Linalgc::gsl_linalg_QR_decomp; *gsl_linalg_QR_solve = *Math::GSL::Linalgc::gsl_linalg_QR_solve; *gsl_linalg_QR_svx = *Math::GSL::Linalgc::gsl_linalg_QR_svx; *gsl_linalg_QR_lssolve = *Math::GSL::Linalgc::gsl_linalg_QR_lssolve; *gsl_linalg_QR_QRsolve = *Math::GSL::Linalgc::gsl_linalg_QR_QRsolve; *gsl_linalg_QR_Rsolve = *Math::GSL::Linalgc::gsl_linalg_QR_Rsolve; *gsl_linalg_QR_Rsvx = *Math::GSL::Linalgc::gsl_linalg_QR_Rsvx; *gsl_linalg_QR_update = *Math::GSL::Linalgc::gsl_linalg_QR_update; *gsl_linalg_QR_QTvec = *Math::GSL::Linalgc::gsl_linalg_QR_QTvec; *gsl_linalg_QR_Qvec = *Math::GSL::Linalgc::gsl_linalg_QR_Qvec; *gsl_linalg_QR_QTmat = *Math::GSL::Linalgc::gsl_linalg_QR_QTmat; *gsl_linalg_QR_unpack = *Math::GSL::Linalgc::gsl_linalg_QR_unpack; *gsl_linalg_R_solve = *Math::GSL::Linalgc::gsl_linalg_R_solve; *gsl_linalg_R_svx = *Math::GSL::Linalgc::gsl_linalg_R_svx; *gsl_linalg_QRPT_decomp = *Math::GSL::Linalgc::gsl_linalg_QRPT_decomp; *gsl_linalg_QRPT_decomp2 = *Math::GSL::Linalgc::gsl_linalg_QRPT_decomp2; *gsl_linalg_QRPT_solve = *Math::GSL::Linalgc::gsl_linalg_QRPT_solve; *gsl_linalg_QRPT_svx = *Math::GSL::Linalgc::gsl_linalg_QRPT_svx; *gsl_linalg_QRPT_QRsolve = *Math::GSL::Linalgc::gsl_linalg_QRPT_QRsolve; *gsl_linalg_QRPT_Rsolve = *Math::GSL::Linalgc::gsl_linalg_QRPT_Rsolve; *gsl_linalg_QRPT_Rsvx = *Math::GSL::Linalgc::gsl_linalg_QRPT_Rsvx; *gsl_linalg_QRPT_update = *Math::GSL::Linalgc::gsl_linalg_QRPT_update; *gsl_linalg_LQ_decomp = *Math::GSL::Linalgc::gsl_linalg_LQ_decomp; *gsl_linalg_LQ_solve_T = *Math::GSL::Linalgc::gsl_linalg_LQ_solve_T; *gsl_linalg_LQ_svx_T = *Math::GSL::Linalgc::gsl_linalg_LQ_svx_T; *gsl_linalg_LQ_lssolve_T = *Math::GSL::Linalgc::gsl_linalg_LQ_lssolve_T; *gsl_linalg_LQ_Lsolve_T = *Math::GSL::Linalgc::gsl_linalg_LQ_Lsolve_T; *gsl_linalg_LQ_Lsvx_T = *Math::GSL::Linalgc::gsl_linalg_LQ_Lsvx_T; *gsl_linalg_L_solve_T = *Math::GSL::Linalgc::gsl_linalg_L_solve_T; *gsl_linalg_LQ_vecQ = *Math::GSL::Linalgc::gsl_linalg_LQ_vecQ; *gsl_linalg_LQ_vecQT = *Math::GSL::Linalgc::gsl_linalg_LQ_vecQT; *gsl_linalg_LQ_unpack = *Math::GSL::Linalgc::gsl_linalg_LQ_unpack; *gsl_linalg_LQ_update = *Math::GSL::Linalgc::gsl_linalg_LQ_update; *gsl_linalg_LQ_LQsolve = *Math::GSL::Linalgc::gsl_linalg_LQ_LQsolve; *gsl_linalg_PTLQ_decomp = *Math::GSL::Linalgc::gsl_linalg_PTLQ_decomp; *gsl_linalg_PTLQ_decomp2 = *Math::GSL::Linalgc::gsl_linalg_PTLQ_decomp2; *gsl_linalg_PTLQ_solve_T = *Math::GSL::Linalgc::gsl_linalg_PTLQ_solve_T; *gsl_linalg_PTLQ_svx_T = *Math::GSL::Linalgc::gsl_linalg_PTLQ_svx_T; *gsl_linalg_PTLQ_LQsolve_T = *Math::GSL::Linalgc::gsl_linalg_PTLQ_LQsolve_T; *gsl_linalg_PTLQ_Lsolve_T = *Math::GSL::Linalgc::gsl_linalg_PTLQ_Lsolve_T; *gsl_linalg_PTLQ_Lsvx_T = *Math::GSL::Linalgc::gsl_linalg_PTLQ_Lsvx_T; *gsl_linalg_PTLQ_update = *Math::GSL::Linalgc::gsl_linalg_PTLQ_update; *gsl_linalg_cholesky_decomp = *Math::GSL::Linalgc::gsl_linalg_cholesky_decomp; *gsl_linalg_cholesky_solve = *Math::GSL::Linalgc::gsl_linalg_cholesky_solve; *gsl_linalg_cholesky_svx = *Math::GSL::Linalgc::gsl_linalg_cholesky_svx; *gsl_linalg_cholesky_invert = *Math::GSL::Linalgc::gsl_linalg_cholesky_invert; *gsl_linalg_cholesky_decomp_unit = *Math::GSL::Linalgc::gsl_linalg_cholesky_decomp_unit; *gsl_linalg_complex_cholesky_decomp = *Math::GSL::Linalgc::gsl_linalg_complex_cholesky_decomp; *gsl_linalg_complex_cholesky_solve = *Math::GSL::Linalgc::gsl_linalg_complex_cholesky_solve; *gsl_linalg_complex_cholesky_svx = *Math::GSL::Linalgc::gsl_linalg_complex_cholesky_svx; *gsl_linalg_symmtd_decomp = *Math::GSL::Linalgc::gsl_linalg_symmtd_decomp; *gsl_linalg_symmtd_unpack = *Math::GSL::Linalgc::gsl_linalg_symmtd_unpack; *gsl_linalg_symmtd_unpack_T = *Math::GSL::Linalgc::gsl_linalg_symmtd_unpack_T; *gsl_linalg_hermtd_decomp = *Math::GSL::Linalgc::gsl_linalg_hermtd_decomp; *gsl_linalg_hermtd_unpack = *Math::GSL::Linalgc::gsl_linalg_hermtd_unpack; *gsl_linalg_hermtd_unpack_T = *Math::GSL::Linalgc::gsl_linalg_hermtd_unpack_T; *gsl_linalg_HH_solve = *Math::GSL::Linalgc::gsl_linalg_HH_solve; *gsl_linalg_HH_svx = *Math::GSL::Linalgc::gsl_linalg_HH_svx; *gsl_linalg_solve_symm_tridiag = *Math::GSL::Linalgc::gsl_linalg_solve_symm_tridiag; *gsl_linalg_solve_tridiag = *Math::GSL::Linalgc::gsl_linalg_solve_tridiag; *gsl_linalg_solve_symm_cyc_tridiag = *Math::GSL::Linalgc::gsl_linalg_solve_symm_cyc_tridiag; *gsl_linalg_solve_cyc_tridiag = *Math::GSL::Linalgc::gsl_linalg_solve_cyc_tridiag; *gsl_linalg_bidiag_decomp = *Math::GSL::Linalgc::gsl_linalg_bidiag_decomp; *gsl_linalg_bidiag_unpack = *Math::GSL::Linalgc::gsl_linalg_bidiag_unpack; *gsl_linalg_bidiag_unpack2 = *Math::GSL::Linalgc::gsl_linalg_bidiag_unpack2; *gsl_linalg_bidiag_unpack_B = *Math::GSL::Linalgc::gsl_linalg_bidiag_unpack_B; *gsl_linalg_balance_matrix = *Math::GSL::Linalgc::gsl_linalg_balance_matrix; *gsl_linalg_balance_accum = *Math::GSL::Linalgc::gsl_linalg_balance_accum; *gsl_linalg_balance_columns = *Math::GSL::Linalgc::gsl_linalg_balance_columns; *gsl_permutation_alloc = *Math::GSL::Linalgc::gsl_permutation_alloc; *gsl_permutation_calloc = *Math::GSL::Linalgc::gsl_permutation_calloc; *gsl_permutation_init = *Math::GSL::Linalgc::gsl_permutation_init; *gsl_permutation_free = *Math::GSL::Linalgc::gsl_permutation_free; *gsl_permutation_memcpy = *Math::GSL::Linalgc::gsl_permutation_memcpy; *gsl_permutation_fread = *Math::GSL::Linalgc::gsl_permutation_fread; *gsl_permutation_fwrite = *Math::GSL::Linalgc::gsl_permutation_fwrite; *gsl_permutation_fscanf = *Math::GSL::Linalgc::gsl_permutation_fscanf; *gsl_permutation_fprintf = *Math::GSL::Linalgc::gsl_permutation_fprintf; *gsl_permutation_size = *Math::GSL::Linalgc::gsl_permutation_size; *gsl_permutation_data = *Math::GSL::Linalgc::gsl_permutation_data; *gsl_permutation_swap = *Math::GSL::Linalgc::gsl_permutation_swap; *gsl_permutation_valid = *Math::GSL::Linalgc::gsl_permutation_valid; *gsl_permutation_reverse = *Math::GSL::Linalgc::gsl_permutation_reverse; *gsl_permutation_inverse = *Math::GSL::Linalgc::gsl_permutation_inverse; *gsl_permutation_next = *Math::GSL::Linalgc::gsl_permutation_next; *gsl_permutation_prev = *Math::GSL::Linalgc::gsl_permutation_prev; *gsl_permutation_mul = *Math::GSL::Linalgc::gsl_permutation_mul; *gsl_permutation_linear_to_canonical = *Math::GSL::Linalgc::gsl_permutation_linear_to_canonical; *gsl_permutation_canonical_to_linear = *Math::GSL::Linalgc::gsl_permutation_canonical_to_linear; *gsl_permutation_inversions = *Math::GSL::Linalgc::gsl_permutation_inversions; *gsl_permutation_linear_cycles = *Math::GSL::Linalgc::gsl_permutation_linear_cycles; *gsl_permutation_canonical_cycles = *Math::GSL::Linalgc::gsl_permutation_canonical_cycles; *gsl_permutation_get = *Math::GSL::Linalgc::gsl_permutation_get; *gsl_complex_polar = *Math::GSL::Linalgc::gsl_complex_polar; *gsl_complex_rect = *Math::GSL::Linalgc::gsl_complex_rect; *gsl_complex_arg = *Math::GSL::Linalgc::gsl_complex_arg; *gsl_complex_abs = *Math::GSL::Linalgc::gsl_complex_abs; *gsl_complex_abs2 = *Math::GSL::Linalgc::gsl_complex_abs2; *gsl_complex_logabs = *Math::GSL::Linalgc::gsl_complex_logabs; *gsl_complex_add = *Math::GSL::Linalgc::gsl_complex_add; *gsl_complex_sub = *Math::GSL::Linalgc::gsl_complex_sub; *gsl_complex_mul = *Math::GSL::Linalgc::gsl_complex_mul; *gsl_complex_div = *Math::GSL::Linalgc::gsl_complex_div; *gsl_complex_add_real = *Math::GSL::Linalgc::gsl_complex_add_real; *gsl_complex_sub_real = *Math::GSL::Linalgc::gsl_complex_sub_real; *gsl_complex_mul_real = *Math::GSL::Linalgc::gsl_complex_mul_real; *gsl_complex_div_real = *Math::GSL::Linalgc::gsl_complex_div_real; *gsl_complex_add_imag = *Math::GSL::Linalgc::gsl_complex_add_imag; *gsl_complex_sub_imag = *Math::GSL::Linalgc::gsl_complex_sub_imag; *gsl_complex_mul_imag = *Math::GSL::Linalgc::gsl_complex_mul_imag; *gsl_complex_div_imag = *Math::GSL::Linalgc::gsl_complex_div_imag; *gsl_complex_conjugate = *Math::GSL::Linalgc::gsl_complex_conjugate; *gsl_complex_inverse = *Math::GSL::Linalgc::gsl_complex_inverse; *gsl_complex_negative = *Math::GSL::Linalgc::gsl_complex_negative; *gsl_complex_sqrt = *Math::GSL::Linalgc::gsl_complex_sqrt; *gsl_complex_sqrt_real = *Math::GSL::Linalgc::gsl_complex_sqrt_real; *gsl_complex_pow = *Math::GSL::Linalgc::gsl_complex_pow; *gsl_complex_pow_real = *Math::GSL::Linalgc::gsl_complex_pow_real; *gsl_complex_exp = *Math::GSL::Linalgc::gsl_complex_exp; *gsl_complex_log = *Math::GSL::Linalgc::gsl_complex_log; *gsl_complex_log10 = *Math::GSL::Linalgc::gsl_complex_log10; *gsl_complex_log_b = *Math::GSL::Linalgc::gsl_complex_log_b; *gsl_complex_sin = *Math::GSL::Linalgc::gsl_complex_sin; *gsl_complex_cos = *Math::GSL::Linalgc::gsl_complex_cos; *gsl_complex_sec = *Math::GSL::Linalgc::gsl_complex_sec; *gsl_complex_csc = *Math::GSL::Linalgc::gsl_complex_csc; *gsl_complex_tan = *Math::GSL::Linalgc::gsl_complex_tan; *gsl_complex_cot = *Math::GSL::Linalgc::gsl_complex_cot; *gsl_complex_arcsin = *Math::GSL::Linalgc::gsl_complex_arcsin; *gsl_complex_arcsin_real = *Math::GSL::Linalgc::gsl_complex_arcsin_real; *gsl_complex_arccos = *Math::GSL::Linalgc::gsl_complex_arccos; *gsl_complex_arccos_real = *Math::GSL::Linalgc::gsl_complex_arccos_real; *gsl_complex_arcsec = *Math::GSL::Linalgc::gsl_complex_arcsec; *gsl_complex_arcsec_real = *Math::GSL::Linalgc::gsl_complex_arcsec_real; *gsl_complex_arccsc = *Math::GSL::Linalgc::gsl_complex_arccsc; *gsl_complex_arccsc_real = *Math::GSL::Linalgc::gsl_complex_arccsc_real; *gsl_complex_arctan = *Math::GSL::Linalgc::gsl_complex_arctan; *gsl_complex_arccot = *Math::GSL::Linalgc::gsl_complex_arccot; *gsl_complex_sinh = *Math::GSL::Linalgc::gsl_complex_sinh; *gsl_complex_cosh = *Math::GSL::Linalgc::gsl_complex_cosh; *gsl_complex_sech = *Math::GSL::Linalgc::gsl_complex_sech; *gsl_complex_csch = *Math::GSL::Linalgc::gsl_complex_csch; *gsl_complex_tanh = *Math::GSL::Linalgc::gsl_complex_tanh; *gsl_complex_coth = *Math::GSL::Linalgc::gsl_complex_coth; *gsl_complex_arcsinh = *Math::GSL::Linalgc::gsl_complex_arcsinh; *gsl_complex_arccosh = *Math::GSL::Linalgc::gsl_complex_arccosh; *gsl_complex_arccosh_real = *Math::GSL::Linalgc::gsl_complex_arccosh_real; *gsl_complex_arcsech = *Math::GSL::Linalgc::gsl_complex_arcsech; *gsl_complex_arccsch = *Math::GSL::Linalgc::gsl_complex_arccsch; *gsl_complex_arctanh = *Math::GSL::Linalgc::gsl_complex_arctanh; *gsl_complex_arctanh_real = *Math::GSL::Linalgc::gsl_complex_arctanh_real; *gsl_complex_arccoth = *Math::GSL::Linalgc::gsl_complex_arccoth; ############# Class : Math::GSL::Linalg::gsl_permutation_struct ############## package Math::GSL::Linalg::gsl_permutation_struct; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( Math::GSL::Linalg ); %OWNER = (); %ITERATORS = (); *swig_size_get = *Math::GSL::Linalgc::gsl_permutation_struct_size_get; *swig_size_set = *Math::GSL::Linalgc::gsl_permutation_struct_size_set; *swig_data_get = *Math::GSL::Linalgc::gsl_permutation_struct_data_get; *swig_data_set = *Math::GSL::Linalgc::gsl_permutation_struct_data_set; sub new { my $pkg = shift; my $self = Math::GSL::Linalgc::new_gsl_permutation_struct(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { Math::GSL::Linalgc::delete_gsl_permutation_struct($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : Math::GSL::Linalg::gsl_complex_long_double ############## package Math::GSL::Linalg::gsl_complex_long_double; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( Math::GSL::Linalg ); %OWNER = (); %ITERATORS = (); *swig_dat_get = *Math::GSL::Linalgc::gsl_complex_long_double_dat_get; *swig_dat_set = *Math::GSL::Linalgc::gsl_complex_long_double_dat_set; sub new { my $pkg = shift; my $self = Math::GSL::Linalgc::new_gsl_complex_long_double(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { Math::GSL::Linalgc::delete_gsl_complex_long_double($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : Math::GSL::Linalg::gsl_complex ############## package Math::GSL::Linalg::gsl_complex; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( Math::GSL::Linalg ); %OWNER = (); %ITERATORS = (); *swig_dat_get = *Math::GSL::Linalgc::gsl_complex_dat_get; *swig_dat_set = *Math::GSL::Linalgc::gsl_complex_dat_set; sub new { my $pkg = shift; my $self = Math::GSL::Linalgc::new_gsl_complex(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { Math::GSL::Linalgc::delete_gsl_complex($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : Math::GSL::Linalg::gsl_complex_float ############## package Math::GSL::Linalg::gsl_complex_float; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( Math::GSL::Linalg ); %OWNER = (); %ITERATORS = (); *swig_dat_get = *Math::GSL::Linalgc::gsl_complex_float_dat_get; *swig_dat_set = *Math::GSL::Linalgc::gsl_complex_float_dat_set; sub new { my $pkg = shift; my $self = Math::GSL::Linalgc::new_gsl_complex_float(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { Math::GSL::Linalgc::delete_gsl_complex_float($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } # ------- VARIABLE STUBS -------- package Math::GSL::Linalg; *GSL_MAJOR_VERSION = *Math::GSL::Linalgc::GSL_MAJOR_VERSION; *GSL_MINOR_VERSION = *Math::GSL::Linalgc::GSL_MINOR_VERSION; *GSL_POSZERO = *Math::GSL::Linalgc::GSL_POSZERO; *GSL_NEGZERO = *Math::GSL::Linalgc::GSL_NEGZERO; *GSL_LINALG_MOD_NONE = *Math::GSL::Linalgc::GSL_LINALG_MOD_NONE; *GSL_LINALG_MOD_TRANSPOSE = *Math::GSL::Linalgc::GSL_LINALG_MOD_TRANSPOSE; *GSL_LINALG_MOD_CONJUGATE = *Math::GSL::Linalgc::GSL_LINALG_MOD_CONJUGATE; @EXPORT_OK = qw/$GSL_LINALG_MOD_NONE $GSL_LINALG_MOD_TRANSPOSE $GSL_LINALG_MOD_CONJUGATE gsl_linalg_matmult gsl_linalg_matmult_mod gsl_linalg_exponential_ss gsl_linalg_householder_transform gsl_linalg_complex_householder_transform gsl_linalg_householder_hm gsl_linalg_householder_mh gsl_linalg_householder_hv gsl_linalg_householder_hm1 gsl_linalg_complex_householder_hm gsl_linalg_complex_householder_mh gsl_linalg_complex_householder_hv gsl_linalg_hessenberg_decomp gsl_linalg_hessenberg_unpack gsl_linalg_hessenberg_unpack_accum gsl_linalg_hessenberg_set_zero gsl_linalg_hessenberg_submatrix gsl_linalg_hessenberg gsl_linalg_hesstri_decomp gsl_linalg_SV_decomp gsl_linalg_SV_decomp_mod gsl_linalg_SV_decomp_jacobi gsl_linalg_SV_solve gsl_linalg_LU_decomp gsl_linalg_LU_solve gsl_linalg_LU_svx gsl_linalg_LU_refine gsl_linalg_LU_invert gsl_linalg_LU_det gsl_linalg_LU_lndet gsl_linalg_LU_sgndet gsl_linalg_complex_LU_decomp gsl_linalg_complex_LU_solve gsl_linalg_complex_LU_svx gsl_linalg_complex_LU_refine gsl_linalg_complex_LU_invert gsl_linalg_complex_LU_det gsl_linalg_complex_LU_lndet gsl_linalg_complex_LU_sgndet gsl_linalg_QR_decomp gsl_linalg_QR_solve gsl_linalg_QR_svx gsl_linalg_QR_lssolve gsl_linalg_QR_QRsolve gsl_linalg_QR_Rsolve gsl_linalg_QR_Rsvx gsl_linalg_QR_update gsl_linalg_QR_QTvec gsl_linalg_QR_Qvec gsl_linalg_QR_QTmat gsl_linalg_QR_unpack gsl_linalg_R_solve gsl_linalg_R_svx gsl_linalg_QRPT_decomp gsl_linalg_QRPT_decomp2 gsl_linalg_QRPT_solve gsl_linalg_QRPT_svx gsl_linalg_QRPT_QRsolve gsl_linalg_QRPT_Rsolve gsl_linalg_QRPT_Rsvx gsl_linalg_QRPT_update gsl_linalg_LQ_decomp gsl_linalg_LQ_solve_T gsl_linalg_LQ_svx_T gsl_linalg_LQ_lssolve_T gsl_linalg_LQ_Lsolve_T gsl_linalg_LQ_Lsvx_T gsl_linalg_L_solve_T gsl_linalg_LQ_vecQ gsl_linalg_LQ_vecQT gsl_linalg_LQ_unpack gsl_linalg_LQ_update gsl_linalg_LQ_LQsolve gsl_linalg_PTLQ_decomp gsl_linalg_PTLQ_decomp2 gsl_linalg_PTLQ_solve_T gsl_linalg_PTLQ_svx_T gsl_linalg_PTLQ_LQsolve_T gsl_linalg_PTLQ_Lsolve_T gsl_linalg_PTLQ_Lsvx_T gsl_linalg_PTLQ_update gsl_linalg_cholesky_decomp gsl_linalg_cholesky_solve gsl_linalg_cholesky_svx gsl_linalg_cholesky_decomp_unit gsl_linalg_complex_cholesky_decomp gsl_linalg_complex_cholesky_solve gsl_linalg_complex_cholesky_svx gsl_linalg_symmtd_decomp gsl_linalg_symmtd_unpack gsl_linalg_symmtd_unpack_T gsl_linalg_hermtd_decomp gsl_linalg_hermtd_unpack gsl_linalg_hermtd_unpack_T gsl_linalg_HH_solve gsl_linalg_HH_svx gsl_linalg_solve_symm_tridiag gsl_linalg_solve_tridiag gsl_linalg_solve_symm_cyc_tridiag gsl_linalg_solve_cyc_tridiag gsl_linalg_bidiag_decomp gsl_linalg_bidiag_unpack gsl_linalg_bidiag_unpack2 gsl_linalg_bidiag_unpack_B gsl_linalg_balance_matrix gsl_linalg_balance_accum gsl_linalg_balance_columns /; %EXPORT_TAGS = ( all =>[ @EXPORT_OK ] ); __END__
1;