|
Ublas : |
Subject: Re: [ublas] indirect_matrix with range
From: Kraus Philipp (philipp.kraus_at_[hidden])
Date: 2011-03-08 06:31:22
Thanks Ralf, that works :-)
Phil
Am 08.03.2011 um 11:31 schrieb Ralf Denzer:
> Hi Phil,
>
> for the special case of accessing all indices you can use
> "ublas::indirect_array<>::all()" instead of "range(0, data.size2())"
>
> i.e.
>
> ublas::matrix_indirect<ublas::matrix<double> > projectmatrix(data,
> idx, ublas::indirect_array<>::all());
>
> should do it (not tested).
>
> Bye
>
> Ralf
>
> ---------
>
> I use a indirect_array to extract different rows of a matrix:
> ublas::matrix<double> data = /* data is filled */
> ublas::indirect_array<> idx = /* get index array */
>
> This call works well:
>
> ublas::matrix_indirect<ublas::matrix<double> > projectmatrix(data,
> idx, idx);
>
> but I would like to get all columns of the matrix like
> ublas::matrix_indirect<ublas::matrix<double> > projectmatrix(data,
> idx, range(0, data.size2()));
> Should I create a temporary index array or can I use the
> ublas::range ?
> Thanks
> Phil
>
>
>
> Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
> Toolbar eingebaut! http://produkte.web.de/go/toolbar
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: philipp.kraus_at_[hidden]