Boost logo

Ublas :

Subject: Re: [ublas] efficient way to convert a matrix to col major order
From: Kraus Philipp (philipp.kraus_at_[hidden])
Date: 2011-08-08 07:27:59


Am 08.08.2011 um 12:31 schrieb Umut Tabak:

> On 08/08/2011 11:53 AM, Kraus Philipp wrote:
>> Hi Umut,
>>
>> we are talking about the same question in my thread "pointer to matrix structure"
>>
>> Greetings
>>
>> Phil
>>
> Hey Phil,
>
> Depending on my previous ublas experience, the only way, I see, would be to initilize a csc matrix from the triplets of a csr matrix, then the internal structure is in the format that we want. And for my application I need the triplets of the column oriented matrix and I have some codes for this already to extract this data it is a bit interfacing overhead though.
>
> I guess there is no direct way for this, let me know if you have better workarounds...

Hi Umut,

I'm using the copy-constructor to change the order of the matrix, but I run into a memory problem, because I use very large matrices with around 10^6 - 10^9 (in some cases 10^12) non-zero elements, so with the copy constructor I duplicate the matrix data. I need only an iterator or something else for a column-major access without duplicating

Phil