Re: [eigen] still the solve() API debate |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] still the solve() API debate
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Fri, 11 Sep 2009 15:00:31 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=QKCY/EFz+9415M/ncFxu1PDsqgz+UvGanVH0w+HmQwk=; b=bwSPgGeIgP2KcSnw/ojpIgkm3cB2S+o3qXQCrD2H8ICZnJEjc8G9pWxNki8nx7wby6 dEB6AVQO+EXtPXPL7MbsTHHasK86g3ErQf/hC8xYYsSoDAGHadMxMkyYKqzEXs0uwuwG QN53NcPTwggOfT2C3nBw6Lt0lee3j7nKYDPvU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=FDk82PspExdjVr78oejtpISMqQvMtl5i9MGfpX/gGkW3Mm6+xMICHLmYUZsbXfwlBL kb3TtOj/Kfshf7lY1LQU9prWAGBCzEj8pxtD64fJNzwLOTetxAnzOJiE31+a+fSoLu0g ZtimnuTYlfcOlAP1KPi62o0LHPNd3SJN0amzw=
On Fri, Sep 11, 2009 at 2:15 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
> Hey, what do you think about renaming .ref() by .inplace() in this
> case? Then this API looks quite good to me:
>
> A.solve(b.inplace());
>
> I'd be OK with that API, actually I think that it's not even
> significantly heavier than the plain-c++-reference option,
> A.solveInPlace(b).
But isn't that from an effort point of view again a little bit
overkill. You would need to introduce a new class just in order to be
able to write .inplace() instead of solveInPlace(). I would prefer
A.solveInPlace(b)...
Also, looking back at the discussion on clean output arguments - what
was again the reason to pass a const reference to swap (first e-mail
by Gael, case 3)?? The implementation is involving a const_cast! I
mean swap changes the data. What am I missing?
Currently, I completely fail to see arguments for ref(), inout() or
similar... can we not just use the 'const' keyword to make it crystal
clear when something is an output and when it is not?
Hauke