Re: [eigen] Eigen appears to rock. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Eigen appears to rock.
- From: "Gael Guennebaud" <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 22 Aug 2008 15:51:31 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=FbdSx2tCcI6E4yrD6y7tVvlf2K8jKrCJ3E3Xmqqji2s=; b=AKQqJX/Jbn2w6BeXHqPmg+r22oXmcpgZ/tqzul931RPn3G1LQJc8de2m9cvQogoZuR U1y8qa0IaAOBptc0s7nJmhBiPBa+r4/ta1065OXH38XHyjGY2rXZ0OeAG2gcZlXBq3vZ KuAe6KoVKiRqGtlG20lucfX7Cn0ucE9Wsctq0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=xhOJnNFWrNWc3rGWJVZ5fMgQHztGKD0UsHeIuYvHPDg7Qr/Md+xyW0Yx+uIvazUyOu X1D7sYSSExel6BXaJIwyM4QluP2xKFVz8lW5NA2h5VtRY/BKQ+e+H2/sklMSfiS7qgbl Gilm5TzI6AUGs9XL/P9TdSERF+610+Mv66ZdQ=
On Fri, Aug 22, 2008 at 3:18 PM, Konstantin Heil
<konst.heil@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi!
>
> On Friday 22 August 2008 15:09:54 Gael Guennebaud wrote:
>> For instance, if I want the mid point m of two Points p1 and p2:
>> Point m = 0.5*(p1+p2);
>> would have to be written:
>> Point m = 0.5 * ((p1-Point::Zero()) + (p2-Point::Zero())) + Point::Zero();
>> which version is more confusing ?
>
> Wow, this is very complicate. What's about
> Point m = p1+0.5*(p2-p1);
> This fits to the geometric immagination. Start on p1 and walk 0.5 the way from
> p2 to p1. :)
why not, but what about more general weighted mean of a set of points:
for(i) {
m += p[i] * weight[i];
sumW += weight[i];
}
m /= sumW;
cheers
gael.
> I wish you nice day.
> --
> Konstantin (kostja) Heil <><
> konst.heil@xxxxxxxxxxxxxxxxxxxxxx
> http://kostja.selfip.org
>