Re: [eigen] vector-cwise operator +=/-= |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] vector-cwise operator +=/-=*From*: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>*Date*: Wed, 16 Dec 2009 12:42:46 +0100*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=4jTmLaXh8dO6LnwwjcCpeH5LVodc/EKzUlSztTG0RiM=; b=yDGjLFuWicb80zYy5IZy3dZ2YEaPnQtdYK4RXoxqg7LuqpYIUoM7v5RPtjxkJn+qVP 6MdrpO4slJJqKXKyp6lkAAowbZl4bWWdG6SyWKSsr/3MB8JxhZ7rdsH4s1UXkc7VlBWH 5a5pAvUZre6GOfxkkLM1bfsgDwK1zO4hhrWFI=*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=YauLYfOoLdCAJGdS9bvl+fnfVCjrv3aExlnZfsnfgp9ctO7PvzYzPMFN5U63eD/++q gFSuUwfAUylShHwXdwLmSA2YA5IKIsKwORufzbh6ELsBt7EtITrLC+htBb8hi9193kn1 wAP7gdAeOji4t4/Qx4GOTL+tDwXc2CzChipv8=

On Wed, Dec 16, 2009 at 10:44 AM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:

Ok, I see now in which way my change is affecting all cwise operators even the non-assigning ones and I agree that this is probably not really desired. So, in order to allow the vector-wise assignment one probably needs to specialize operator+=/-= for vector types.

- Hauke

Regarding the convenience I would say 'yes, it's more convenient'. In particular in presence of my previous question - it is (*cough* at least for me) not intuitively clear to the user that the multiplication as proposed by you is equally efficient.

let's see what others think. Maybe a compromise would be to allow automatic transpose for operators += and -= (to be consistent with operator=) but not for non assigning operators (+, -, cwise*, cwiseMin, cwiseMax, etc.).

Ok, I see now in which way my change is affecting all cwise operators even the non-assigning ones and I agree that this is probably not really desired. So, in order to allow the vector-wise assignment one probably needs to specialize operator+=/-= for vector types.

- Hauke

**References**:**[eigen] vector-cwise operator +=/-=***From:*Hauke Heibel

**Re: [eigen] vector-cwise operator +=/-=***From:*Gael Guennebaud

**Re: [eigen] vector-cwise operator +=/-=***From:*Hauke Heibel

**Re: [eigen] vector-cwise operator +=/-=***From:*Gael Guennebaud

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] vector-cwise operator +=/-=** - Next by Date:
**[eigen] ei_redux_impl & ei_alignmentOffset** - Previous by thread:
**Re: [eigen] vector-cwise operator +=/-=** - Next by thread:
**[eigen] ei_redux_impl & ei_alignmentOffset**

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