Boost logo

Boost Users :

From: Angus Leeming (angus.leeming_at_[hidden])
Date: 2004-04-08 07:57:12


Russell Hind wrote:
> Thanks, where are these methods defined? I'm using 1.30.2 and have
> searched the ublas directory for files with lu_factorize in and
> can't find it.

I do not know when these routines arrived, but they are certainly
present in boost 1.31. Example usage:

        #include <boost/numeric/ublas/lu.hpp>

        // On return from lu_factorize,
        // A contains the LU factorization and pm the row pivots.
        ublas::permutation_matrix<size_type> pm(A.size1());
        lu_factorize(A, pm);

        // Initialise el so that it contains the 'b' of Ax = b
        ublas::vector<double> el(zero);
        el(el.size() - 1) = total_length;

        // On return from lu_substitute,
        // el contains the 'x' of Ax=b.
        lu_substitute(A, pm, el);

-- 
Angus

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