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

Phil


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 http://movieflat.web.de
_______________________________________________
ublas mailing list
ublas@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: philipp.kraus@flashpixx.de