Boost logo

Boost :

From: Kresimir Fresl (fresl_at_[hidden])
Date: 2002-12-03 03:02:43


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk