Re: [eigen] cwise operator vs matlab's .* notation |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] cwise operator vs matlab's .* notation
- From: Will S <billy.baloop@xxxxxxxxx>
- Date: Sat, 28 Aug 2010 19:30:50 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=7qTrBgSbhUNVwrsyYvPzfDC0ZVp5RPWKCRax5/MscTc=; b=OT3CCm/OAzuH2AOnICJyGleJGB4C/KonY4BTkX0rA5c64Pq8GEeNEvE3waHl/V7L3r 7rzvv13uQZ9YOdSo6JTURLR27zpAwd6lX8nK7oLR9UC+CPDTsK3ougqQ6q2yYNpxcBfu 0winwZPJwfIrIhB1sJQgK72cxW/Ra8B0l//1k=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=MSVAii/yVToMGJVFceAZ5eVyhV/ShnO0wcBRwcQsEHn7ksdLkqrW/6A93EQr/IaqDC cqVY82yUt+tNSE5XDPX5EV4Djva4oieHgJa0nSt6+oEhmIeLJ42Isyvr/Bz6qJJAUSYq n3eYClb0W9rFJMm7G44BGu85gKo1d4cgRLLus=
That said, I much prefer Eigen 3 syntax:
result = m1.cwiseProduct( m2 ) ;
On Sat, Aug 28, 2010 at 4:15 PM, Abe Bachrach <abachrach@xxxxxxxxx> wrote:
> Oops, good point, I didn't know/forgot that you can't define arbitrary
> symbols as operators in C++
> I also didn't know that .* was already an operator that can't be
> overloaded....
>
> guess that answers my (stupid) question :-P
> thanks!
> -=Abe
>
> On Sat, Aug 28, 2010 at 4:01 PM, Christoph Hertzberg
> <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> Abe Bachrach wrote:
>> > [...]
>> > In my mind, it would seem like having BOTH the verbose .cwise() and the
>> > concise .* type operators for things like multiplication would make
>> > sense.
>>
>> Nice idea, but you can't overload operator.*
>>
>>
>> http://en.wikipedia.org/wiki/Operators_in_C_and_C++#Member_and_pointer_operators
>>
>> Christoph
>>
>>
>>
>> --
>> ----------------------------------------------
>> Dipl.-Inf. Christoph Hertzberg
>> Cartesium 0.051
>> Universität Bremen
>> Enrique-Schmidt-Straße 5
>> 28359 Bremen
>>
>> Tel: (+49) 421-218-64252
>> ----------------------------------------------
>>
>>
>
>