# Jonathan Leto: December 2008 Archives

## Matrix Eigenvalues in Perl Don't Get Much Easier

The Matrix subsystem has really grown up in the last few days since the 0.16 release, including easy-to-use methods to calculate Matrix eigenvalues. All kinds of other methods are now available, like
```my \$det1 = \$A->det;      # determinant
my \$det2 = abs \$A;       # determinant

my \$inv = \$A->inverse;
my @eigs = \$A->eigenvalues;

my (\$eigenvalues, \$eigenvectors) = \$matrix->eigenpair;
my (\$eig1,\$eig2) = @\$eigenvalues;
my (\$u,\$v)       = @\$eigenvectors;
```
Compare this new script for calculating eigenvalues and eigenvectors of a nonsymmetric matrix to the old version. Yes, quite an improvement and quite pleasing to the eye now. Note that \$A->eigenvalues; returns a list of Math::Complex objects because in general the eigenvalues of a real matrix can be complex. Only if your matrix is symmetric are you guaranteed real eigenvalues.

## Math::GSL 0.16 - More features and more rigorous tests

I just pushed Math::GSL 0.16 to CPAN, it should be showing up here Real Soon Now, depending on how much traffic the dump trucks hit on the intertubes

• Fixed RT#40947: configure_requires ExtUtils::PkgConfig bug
• Fix an include bug in Histogram2D which caused the build to fail (Thierry)
• Added reverse() and swap() methods to VectorComplex objects with tests and docs
• as_list() and get() now work on VectorComplex objects
• as_list() returns a list of Math::Complex objects
• get() returns a list of Math::GSL::Complex objects
• Math::GSL::Test::ok_status() now takes an optional message argument
• New subsytems: VectorComplex and MatrixComplex
• Shows how to find the eigenvalues of a nonsymmetric matrix
• Added copy() method to vectors
• Improved Vector docs
• Sped up vector dot products by 15x using BLAS function gsl_blas_ddot
• NOTE: using gsl_blas_ddot(\$x->raw,\$y->raw) directly is still about 10 times faster than \$x * \$y due to error checking and function call overhead
• Separated POD and Perl code out of SWIG interface files, yay for proper syntax highlighting
• Added stub test files for Heapsort, IEEEUtils, Multimin, Siman, Wavelet2D
• All test files now keep track of how many tests should run

## Math::GSL 0.15_05

I just pushed Math::GSL 0.15_05 to CPAN, which includes these fixes since 0.15_04 :

• Fixed RT#40947: configure_requires ExtUtils::PkgConfig bug
• Added reverse() method to VectorComplex objects with tests and docs
• as_list() and get() now work on VectorComplex objects
• as_list() returns a list of Math::Complex objects
• get() returns a list of Math::GSL::Complex objects

Enjoy!

### Monthly Archives

 Subscribe to math-gsl-dev Email: Visit this group