|
Ublas : |
Subject: Re: [ublas] Matrix 'View' class
From: Andrey Asadchev (asadchev_at_[hidden])
Date: 2010-08-03 03:19:00
On Tue, Aug 3, 2010 at 2:14 AM, Andrey Asadchev <asadchev_at_[hidden]> wrote:
>
> hello Jörn Ungermann
>
> I use array_adapter (and it's variations) to basically accomplish that:
>
> matrix<double, column_major, array_adapter<double> > matrix(m, n,
> array_adapter<double>(...));
>
> if you are looking for immediate solution.
>
I must add, adapter has deep copy semantics, so I use this trick :
matrix(m, n, array_adapter<double>(m*n, NULL));
array_adapter<double> data(m*n, actual_data);
matrix.swap(data);