Boost logo

Ublas :

Subject: Re: [ublas] submatrix with indexvector
From: Kraus Philipp (philipp.kraus_at_[hidden])
Date: 2010-07-28 14:17:21

Hi Ralf,

I try to copy with std::copy my data into the indirect array:
std::vector<std::size_t> data(....);
std::sort(data.begin(), std::endl(),....);

ublas::indirect_array<> l_idx(data.size());
std::copy(data.begin(), data.end(), l_idx.begin());

I get the error in stl_algobase.h "assignment of read-only location"
I can copy the data with a for-loop, but I would prefere std::copy

Thanks for help


Am 26.07.2010 um 10:35 schrieb Ralf Denzer:

> >thanks for the tip. Can I convert a ublas::vector<std::size_t>
> direct to the indirect_array
> Hmmm ... I don't think so. Maybe you can try use indirect_array<>
> directly as a replacement
> of ublas::vector<std::size_t> in your algorithm. Depends how you
> calculate your indices.
> >or should I copy element by element?
> Yes, that's always possible. You can use e.g. std::copy()
> Ralf
> GRATIS für alle WEB.DE Nutzer: Die maxdome Movie-FLAT!
> Jetzt freischalten unter
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> Sent to: philipp.kraus_at_[hidden]