|
Boost Users : |
From: Kresimir Fresl (fresl_at_[hidden])
Date: 2004-10-30 05:08:51
Daniel L Elliott wrote:
[...]
> I am working on adding identity matrices (and perhaps some others) to the
> gesv method of the LAPACK bindings.
As far as I know, LAPACK does not have a notion of identity matrix.
> I have a couple questions about the code.
> In the template <typename MatrA, typename MatrB, typename IVec>
> inline int gesv (MatrA& a, IVec& ipiv, MatrB& b) method the static
> asserts are checking for the matrix types allowed within the gesv type?
Yes. These are types which LAPACK's _gesv routines expect.
Bindings library are (almost) nothing more than a syntactic sugar
for Fortran or C numerical libraries (BLAS, ATLAS, LAPACK, ...).
> Instead of using gesv to invert a very large matrix (which would
> require us to create a very large identity matrix), would it be
> advisable to simply triangularize matrix A (maybe using LU) and
> use the uBLAS solver and an identity_matrix?
The answer is partly outside of the scope of bindings, but the
idea is interesting. gesv.hpp contains bindings for LAPACK's _getrf
routines which compute LU factorisations. Regarding the second step,
LAPACK also has _getri routines which compute the inverse of a matrix,
using the factorisation obtained by _getrf. Adding _getri to bindings
is on the TO DO list. (There are getri in ATLAS bindings, in
clapack.hpp.)
On the other hand, I think that the use of the uBLAS solver with
ublas::identity_matrix is outside of the scope of bindings library.
> Also, any overview of how the bindings and traits work would be very
> helpful!
Docs are in the sandbox:
Intro: http://tinyurl.com/6acht
Traits: http://tinyurl.com/3t4kz
LAPACK bindings: http://tinyurl.com/4pagj
ATLAS bindings: http://tinyurl.com/4ao22
Hope this helps,
fres
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net