Re: [eigen] Why is Triplet read-only?

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


On 2016-02-15 15:44, Elizabeth Fischer wrote:
I noticed that Eigen::Triplet cannot be changed once constructed.  What is
the rationale for this?  In my case, that makes it significantly less
useful than it would otherwise be.

You can actually use any class which is compatible with Eigen::Triplet to store your triplets or inherit from Eigen::Triplet and add accessor functions. Also, you can change them by assigning a new Triplet to them.

That said, I don't see any strong reason for not directly providing write-access. It's probably only because it was not required by the original author.
I'd accept a patch/pull request which adds that functionality.


Christoph



--
 Dipl. Inf., Dipl. Math. Christoph Hertzberg

 Universität Bremen
 FB 3 - Mathematik und Informatik
 AG Robotik
 Robert-Hooke-Straße 1
 28359 Bremen, Germany

 Zentrale: +49 421 178 45-6611

 Besuchsadresse der Nebengeschäftsstelle:
 Robert-Hooke-Straße 5
 28359 Bremen, Germany

 Tel.:    +49 421 178 45-4021
 Empfang: +49 421 178 45-6600
 Fax:     +49 421 178 45-4150
 E-Mail:  chtz@xxxxxxxxxxxxxxxxxxxxxxxx

 Weitere Informationen: http://www.informatik.uni-bremen.de/robotik



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