Boost logo

Ublas :

From: Sourabh (sourabh_at_[hidden])
Date: 2007-03-01 04:03:44


Hi,
What is the problem with this program?
when I run it, it aborts.

#include <boost/numeric/ublas/triangular.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/matrix_sparse.hpp>
#include <boost/numeric/ublas/io.hpp>

using namespace boost::numeric::ublas;

int main () {
    typedef mapped_matrix<double> MyMatrix;
    MyMatrix m (3, 3, 3 * 3);
    vector<double> v (3);
    for (unsigned i = 0; i < v.size (); ++ i)
        v (i) = i;
    std::cout << v << std::endl;
    std::cout << m << std::endl;
    //vector<double> answer = solve (m, v, lower_tag ());
    std::cout << solve (m, v, lower_tag ())
               << std::endl;
}

-- 
-- Sourabh