Boost logo

Ublas :

From: é×ÏÌÇÉÎ áÒÄÁÌÉÏÎ (comaMM_at_[hidden])
Date: 2008-08-21 19:42:00

Hello, everybody!

I found a page about LU-decomposition on Effective uBLAS wiki. Everything looked neat, and I decided to write simple example like this below:

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

using namespace boost::numeric::ublas;

int main () {
    matrix<int> A(3,3), B(identity_matrix<int>(3));
    for (int i=0; i<3; ++i)
            for (int j=0; j<3; ++j)
    std::cout << A << std::endl;
    std::cout << B << std::endl;
    permutation_matrix<> pm(3);
    lu_factorize<matrix<int>, permutation_matrix<> >(A, pm);
    lu_substitute(A, pm, B);
    std::cout << A << std::endl;
    std::cout << B << std::endl;
    return EXIT_SUCCESS;

But when I try to run the compiled executable, I got a run-time assertion with this text:

Check failed in .../include/boost/numeric/ublas/lu.hpp at line 157:
singular != 0 || detail::expression_type_check (prod (triangular_adaptor<matrix_type, unit_lower> (m), triangular_adaptor<matrix_type, upper> (m)), cm)

Maybe someone had already faced this problem?

P.S. On the page about LU-decomposition there was something about getting recent version of lu.hpp from Boost CVS. But the link in Boost::uBLAS documentation seems to be broken.

P.P.S. I have: MS Windows Vista 32-bit with MinGW g++ 3.4.5 compiler. (Boost version is 1.36.0).