Boost logo

Ublas :

Subject: Re: [ublas] pointer to matrix structure
From: Marcel Rehberg (Marcel.Rehberg_at_[hidden])
Date: 2011-08-08 04:37:10


On Sun, 07 Aug 2011 22:38:26 +0200, Philipp Kraus
<philipp.kraus_at_[hidden]> wrote:

> I have found a solution with this:
> ublas::matrix<T> x = ublas::trans(p_dataset);
> write( &([0]), p_datatype, l_dataspace );
> but can I change it without the transpose, because p_dataset is a very
> large matrix? The write method is a library function that writes my
> matrix data, but the write method need a "column oriantated array
> structure", but my p_dataset input matrix is a row oriantated matrix.

You could use
ublas::matrix<T,ublas::column_major> X

as your main matrix type. I use it to interface lapack which also expects
column orientation.