Re: [eigen] Const referencing of matrix indexes

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


Ah, ok. Yes, was referring to MatrixBase.h of 2.0.11.

Cheers,
Daniel.

On 5 February 2010 14:23, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> In the development branch they definitely return references for all
> expressions where that makes sense.
>
> I guess you're talking about 2.0? That's just a design mistake. One of
> many reasons for doing Eigen3 ;)
>
> Benoit
>
> 2010/2/5 Daniel Stonier <d.stonier@xxxxxxxxx>:
>> I just noticed the matrixbase operator[](int index) const (and
>> operator()(...) const) both return "const Scaler" rather than "const
>> Scaler&". Just out of curiosity, what is the reasoning behind this?
>> I've always thought it was standard practice (reading from e.g. the
>> c++ faq-lite) and faster for large objects to return the const
>> reference.
>>
>> Regards,
>> Daniel.
>>
>> --
>> Phone : +82-10-5400-3296 (010-5400-3296)
>> Home: http://snorriheim.dnsdojo.com/
>> Yujin Robot: http://www.yujinrobot.com/
>> Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
>>
>>
>>
>
>
>



-- 
Phone : +82-10-5400-3296 (010-5400-3296)
Home: http://snorriheim.dnsdojo.com/
Yujin Robot: http://www.yujinrobot.com/
Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl



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