Stas Fomin wrote:

typedef ublas::matrix<double> Mat;

This sample works if "typedef ublas::matrix<double> Mat;"
and does not work with "typedef ublas::sparse_matrix<double,ublas::column_major> Mat";
Which compiler are you using?

With

    typedef ublas::sparse_matrix<double,ublas::column_major>

como 4.3. and g++ 3.2 with and without -DNDEBUG give:
======================================================
[2,2]((11,12),(21,22))
[4,4]((11,12,0,0),(21,22,0,0),(0,0,0,0),(0,0,0,0))
[4,4]((11,12,0,0),(21,22,0,0),(0,0,0,0),(0,0,0,0))
[2,2]((11,12),(21,22))
[2,2]((11,12),(21,22))
[4,4]((11,12,0,0),(21,22,0,0),(0,0,0,0),(0,0,0,0))
[4,4]((11,12,0,0),(21,22,0,0),(0,0,0,0),(0,0,0,0))
[2,2]((11,12),(21,22))
======================================================

And also with:

   typedef ublas::sparse_matrix<
          double,
          ublas::column_major,
          std::map<std::size_t, double>
   > Mat;

I am sorry that there's no more help in my post.

Sincerely,

fres

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to