[numeric][ublas] please add vector constructor from boost::range

Hi! is it possible to add a constructor for ublas::vector from boost::range? this would it make easier to construct from pain data (e.g. float*). something like boost::numeric::ublas::vector<float> v(boost::iterator_range<const float*>(myDataBegin, myDataEnd)); -Jochen

If speed is not a major concern, you could use std::vector as the underlying container instead of unbounded_array and use its iteration constructor. Regards, Kai On 7/20/12, Jochen Wilhelmy <jochen.wilhelmy@googlemail.com> wrote:
Hi!
is it possible to add a constructor for ublas::vector from boost::range? this would it make easier to construct from pain data (e.g. float*). something like boost::numeric::ublas::vector<float> v(boost::iterator_range<const float*>(myDataBegin, myDataEnd));
-Jochen
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

I'm checking that with the Range maintainer. On Fri, Jul 20, 2012 at 11:08 AM, Jochen Wilhelmy < jochen.wilhelmy@googlemail.com> wrote:
Hi!
is it possible to add a constructor for ublas::vector from boost::range? this would it make easier to construct from pain data (e.g. float*). something like boost::numeric::ublas::vector<**float> v(boost::iterator_range<const float*>(myDataBegin, myDataEnd));
-Jochen
______________________________**_________________ Unsubscribe & other changes: http://lists.boost.org/** mailman/listinfo.cgi/boost<http://lists.boost.org/mailman/listinfo.cgi/boost>

Jochen Wilhelmy wrote:
Hi!
is it possible to add a constructor for ublas::vector from boost::range? this would it make easier to construct from pain data (e.g. float*). something like boost::numeric::ublas::vector<float> v(boost::iterator_range<const float*>(myDataBegin, myDataEnd));
-Jochen
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Lacking that, I just have a construct_from_range free function, that is then dispatched for every kind of 1D container I use (std::vector, boost::multi_array, ublas, other 3rd party)
participants (4)
-
David Bellot
-
Jochen Wilhelmy
-
Kai Schroeder
-
Neal Becker