Boost logo

Ublas :

Subject: Re: [ublas] LU decomposition of compressed_matrix
From: Alex Hagen-Zanker (ahh34_at_[hidden])
Date: 2011-04-14 07:45:02


On 31/03/2011 09:24, Ungermann, Jörn wrote:
> typedef ublas::compressed_matrix<
> double, ublas::row_major, 0, ublas::unbounded_array<unsigned int>
> > Matrix1;
<snip>
> PS:
> A side effect of this change is that interaction with dense vector and dense matrix gives quite a bit of warnings for conversion between unsigned int and unsigned long. Is there an easy way to also use unsigned int for indices in those structs (but not for the underlying memory, of course)? Our vector sizes/individual matrix dimensions do not exceed 32 bit, whereas the overall memory consumed by the matrices does.

In the coordinate_matrix I could reduce the number of warning by
providing the matching template arguments for the layout, i.e. use
ublas::basic_row_major<unsigned int> to get

typedef ublas::compressed_matrix<
   double, ublas::basic_row_major<unsigned int>, 0, ublas::unbounded_array<unsigned int>
> Matrix1;