On 02/11/2007, Hasan Hasanov <[EMAIL PROTECTED]> wrote: > I am looking for a C++ wrapper for the GSL.
I have a very minimal and probably not great implementation of such a wrapper below which you may find interesting. I can at least vouch that it's quick enough if you compile with optimisations (the -03 in g++), and that it leaks no memory. It also has operator>> and operator<< overloaded for easier input and output of matrices in text format. In fact, it reads and writes in the same text format suitable for GNU Octave. I index from 1 and use operator() for indexing, because I'm a heavy Octave user. I attach this implementation with my own hand-written Makefile and a sample main.cpp to demonstrate its usage. Type "make test" in the directory where you extract the tarball to compile and run the example. > It is also very important that it implements an efficient matrix > inversion operator. The GSL itself only has a few matrix inversion algorithms. It does pivoted LU factorisation for inverting matrices. If your matrices have no specific structure, this is is more or less the best you can do. You can also try tridiagonal reductions or Householder transformations. My wrapper just uses the GSL's LU. > Since Octave is the GNU analogue of Matlab I am wondering if > Octave has an C++ API for matrix operations that would be an alternative to > the above two wrappers? It does. I have not used it much, but others seem to find it useful. - Jordi G. H.
linalg.tar.gz
Description: GNU Zip compressed data
_______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
