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 16:46:52 +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=8Be+06Kir7X6O72RBwVDxcmVXCU5pWJ7KYL4jIYm6go=; b=IbX3KOHSgwqL+w84BHjLLoJeTwI2SkxyzIaknYg+rWElcJRuRgtFEIgcX81a/iD1cY 7+V0ozD4bcitK7ODPhCsuWiBGs5YCBbiK+PwTY8fh3rAQ0L7f8N8+apDGPsSyCAX2C+M ai3p73wpvoico/Q48QdyezFcARyXhKJtBEHJ8=
- 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=Za3908TDRag2lfMWXCstlFfbOEm3rM34H3I4C/TEk9txUdHx8V0jAiMX99eIfwmCDn j+icPK6MAoA5l/pENQg4dxs4XGCXBVxrMwnO3cg40bLpT5ujfm0zMGwi1fY4PmTfq3+y KBmXp9mT+UHMHNZXnjsfFv8n2R3uAe+4hQQ34=
On Fri, Sep 11, 2009 at 3:36 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> Ok, I just caught up with re-reading... that's indeed ugly. But as you
>> guys already observed, in new compiler versions we already have rvalue
>> references. Benoit, what about your idea of passing Matrices by
>> reference and MatrixBase by value? You suggested to do that in the
>> "MatrixBase::swap - why const" thread? This approach would allow an
>> easy transition towards rvalues references in the future.
>
> That would be perfect, if you figure it out.
Great, now I am confused again - just while thinking about it. :)
Why not simply define swap as
template <typename OtherDerived>
void swap(MatrixBase<OtherDerived> m);
I mean in any case. It does not really matter whether a matrix is
passed or not - what we will copy is always only MatrixBase and that's
tiny, right?
Hauke