Re: [eigen] Re: VectorBase issue

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




On Wed, Jun 4, 2008 at 3:51 PM, Benoît Jacob <jacob@xxxxxxxxxxxxxxx> wrote:
OK I can see now that you had mentioned this as solution 2c:

> c - define the overload in 2D matrix specific base class, i.e. in
> VectorBase<Derived,false>:
>       class VectorBase<Derived,false> {
>        Scalar coeff(int,int);
>        etc.
>       };
>    However this approach makes impossible to write generic code on
> fixed-size matrix that might degenerate to vector of even 1x1 matrices...

It took me a while to sort my thoughts on this issue!

hm.. yes that wasn't very explicit, sorry.


I found something that might help:

if you declare in MatrixBase:

using VectorBase<Derived>::block;
using VectorBase<Derived>::coeff;

then it's almost OK. the last remaining pb is that VectorBase<Derived,false> doesnot provide any block or coeff methods... adding them would be somehow stupid... but maybe a last trick will show up, let's wait for the illumination !


You know what.... nothing prevents us from implementing coeff(int,int) also in
VectorBase, with an assert!

Does that solve this issue?

Cheers,

Benoit



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