GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Math::GSL::Linalg(3) User Contributed Perl Documentation Math::GSL::Linalg(3)

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 :

Performs a Givens rotation on the vector ($a,$b) and stores the answer in $c and $s.
Performs a Givens rotation on the $i and $j-th elements of $v, storing them in $c and $s.
 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.
    

For more informations on the functions, we refer you to the GSL official documentation: <http://www.gnu.org/software/gsl/manual/html_node/>

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 "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>

Copyright (C) 2008-2021 Jonathan "Duke" Leto and Thierry Moisan

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2025-07-03 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.