Re: [eigen] API change proposal

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


I agree with Markus. Even ignoring the naming (ResultType, result), the fact that the reference is non-const signals that it is an output of the function.

Patrick

On Wed, Jul 22, 2009 at 3:30 PM, Andrea Arteaga <yo.eres@xxxxxxxxx> wrote:
In principle, I'm agree with Markus, since pointers in C++ can be considered as low-level concept
and Eigen allows a high-level manipulation of objects; that pointers could be "out of place".

But: when a method of LU (or QR) takes a reference as argument, is it clear to users that the
function will modify that argument? Pointers are the classical system to output something, which
cannot be the return value. In spite of the practicality of references, pointers make clear that the
argument is a "output argument", not an input one.

However, Eigen could also provide both behaviours by overloading the method..

Andrea Arteaga






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