Re: [eigen] Cumbersome syntax questions/feedback

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


Hi,

it seems to me that .row() and .col() could be useful in non trivial
use of the Transform class only, and the .matrix() function is
precisely there to cover non trivial uses, so I think it's fine not to
add them...  unless you convince me they are really useful for common
uses...

about EIGEN_TRANSFORM_PLUGIN, yes we definitely need to add that.

cheers,
Gael.

On Mon, Aug 17, 2009 at 4:59 AM, Benoit Jacob<jacob.benoit.1@xxxxxxxxx> wrote:
> Hi,
>
> This is a bit nontrivial: if we start adding row and col, the user
> will start expecting block() too, etc. It would be an unpredictable
> API, if we had row() but not block().
>
> I'm OK to add row, col, block and corner if there's consensus that
> this makes sense to add specifically these methods as opposed to the
> rest of the MatrixBase API. I don't have a strong opinion.
>
> What's easier to do is make sure that Transform is extensible by a
> EIGEN_TRANSFORM_PLUGIN, in the same way as MatrixBase,
> http://eigen.tuxfamily.org/dox/CustomizingEigen.html
>
> would that be helpful to you?
>
> Benoit
>
>
> 2009/8/16 Staffan Gimåker <staffan@xxxxxxxxxx>:
>> Hi again,
>>
>> Another thing that would make my life a bit easier is adding col() and
>> row() methods to Eigen::Transform, similar to the operator()(int row,
>> int col) shortcut already available.
>>
>> I.e. being able to write:
>>
>>  Eigen::Transform3f T;
>>  ...
>>  T.row(0) = ...;
>>
>> rather than
>>
>>  T.matrix().row(0) = ...;
>>
>> Are there any reasons this is a bad idea? I tried it out and it seems to
>> work alright, the patch against 2.0.4 is attached.
>>
>> /Staffan
>>
>
>
>



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