Re: [eigen] Re: Error when using the += operator on complex vectors

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


Keir Mierle wrote:
> Regardless of what the code currently does, it seems as though matrix +=
> array should be unambiguous, and work fine. Is there a technical reason this
> can't be supported? Furthermore, would it be possible to make arrays "viral"
> in that A OP B with A an array or B an array gives an array so the next
> lines become equivalent:
> 
> A += B.array() * C
> A += B * C.array()
> A.array() += B.array() * C
> A.array() += B * C.array()
> A.array() += B.array() * C.array()
> 
> I imagine there is some pitfall preventing this, but it would reduce
> .array() clutter.

A * B * C.array()
  == A.array() * B.array() * C.array(),
or
  == (A * B).array() * C.array() ?

If you are working mainly with arrays, shouldn't you declare your
variables as such in the first place and switch to matrix only when needed?
I guess the main pitfall would be that it would let you forget necessary
conversions. Why for example should this result in an array multiplication?
  Array33f A, B;
  A.matrix() * B;

However, I would agree that addition and subtraction are unambiguous
between arrays and matrices.

Christoph

-- 
----------------------------------------------
Dipl.-Inf. Christoph Hertzberg
Cartesium 0.051
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: (+49) 421-218-64252
----------------------------------------------



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