Boost logo

Ublas :

Subject: Re: [ublas] assign of one matrix_range to another matrix_range
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2009-07-24 15:13:30


Am Friday 24 July 2009 schrieb Michael Norel:
> Hello all!
>
> I can't find the legal way to assign the one matrix_range to another
> matrix_range.
>
>
> matrix_range<M> A;
> matrix_range<M> B;
>
> all assign operation perfrom data copy from A data view to B data
> view.
>
> But i want to assign in manner of

Sorry, but there is no copy constructor available. If you want to pass a
range to a function than you can pass a reference. However there is no
way to copy the whole range information. You can only create a new
range like

matrix_range<M> B(A.data()
  , range(A.start1(), A.start1()+A.size1())
  , range(A.start2(), A.start2()+A.size2())
);

mfg
Gunter