Thomas Reisinger wrote:
I'm new in the field of numeric computing and I would like to learn more about it. To solve my problem I need to invert a matix and use the intermediate result as the input for following calculations.
I browsed the uBLAS library and played a little bit with it but I didn't find a routine for matrix inversion.
As Jon Agiato already replied, uBLAS doesn't have matrix inversion. uBLAS is, more or less, BLAS, that is, it provides elementary vector and matrix operation (scaling, addition, multiplication etc.). One day we will hopefully have uLAPACK -- solution of linear systems, matrix inversion, eigenvalues & eigenvectors... (Roland aka speedsnaii mentioned uBLAS's solve() functions in his reply. But those functions are `triangular' solvers, i.e. matrix A must be triangular -- corresponding BLAS trsm() functions are used in LAPACK for `backward' substitutions after LU or Cholesky factorizations.)
Is there any possibility to preform it in a single step? Is this package the wrong tool for doing this and I should use LAPACK++ or similar stuff?
From LAPACK++ home page:
``[NOTE: This package is being superseded by the Template Numerical
Toolkit (TNT), which utilizes new features of the ANSI C++ specification.
TNT is a newer design, and will integrate the functionlaity of Lapack++,
IML++, SparseLib++, and MV++.]''
(TNT home page is: http://math.nist.gov/tnt/)
But I'd recommend the `bindings' library (as one of the co-authors
I am, of course, biased ;o) which *can be used with uBLAS
vectors and matrices*. Idea is similar to the LAPACK++, that is,
library provides interfaces to other, well-known numerical
libraries (written in Fortran or C).
For example, for matrix inversion you can use ATLAS
bindings:
=========================================
#include