Re: [eigen] Matrix assignment

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On Tuesday 21 October 2008 14:26:34 Benoît Jacob wrote:
> On Tuesday 21 October 2008 14:07:47 Cristóvão Sousa wrote:
> > Another solution that may be nice is to deny any resizing unless
> > you call some function, like:
> >
> >     m0.copy(m1);
> > or
> >     m0.assign() = m1;
>
> This could be called m0.resize() = m1;

Another idea:

note that here we don't need op-assign operators such as += -= *= /= because 
these would never require a resizing.

So in fact, aside from some syntax candy, a Resize proxy doesn't bring any 
advantage. So perhaps it's just simpler to do:

m0.resizeAssign(m1);

(need confirmation from a native English speaker that it sounds OK. Need 
an "And" in the middle?)

Cheers,
Benoit

---


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/