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: "Thomas Vaughan" <tevaughan@xxxxxxxxx>
- Date: Fri, 22 Aug 2008 09:53:04 -0600
- 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=hcMgNdiwgoBhHzG+FS3pDTjAGQGkRoz9oIXSckDNKc0=; b=vNu5Dw/F9objRh1IxXiHbq7FCFmf5CBjwbLBvc3vytgXsDj4Pi7NfjtZWSms/60Zdd a+THfdKSP1se7JTc4A7ToBqjhv60zkCEWAPmHWBNx69HQ/KEDm7txuO0IOdZpk8KFZKH 21eWyZzp48ijrTKLMHWvVXXPg8B4nHvd0r6hY=
- 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=d2Kxi/evJX5irN4W22l8ox7m/hXAZ6574zHiadp2jeyH4aoZqVOIsHM9N04dofIrFX DzYxV1nT4BKrmd/Qm1P7+XqAxpdLR0KxzYRwUzlaQqgXzKuPsyXiUHVMTvvnptV14j72 UnaraGTpkRvYpzOio8Np/39J/xvgGSIFOrDCY=
On Fri, Aug 22, 2008 at 7:51 AM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
>
> but what about more general weighted mean of a set of points:
>
> for(i) {
> m += p[i] * weight[i];
> sumW += weight[i];
> }
> m /= sumW;
It seems that your p is really a displacement vector.
Nevertheless, I agree that, for a large number of points, it is more
expensive to do this:
for(i) {
m += (p[i]-po) * weight[i];
sumW += weight[i];
}
m /= sumW;
(though in some circumstances you might need to do this even in your
scheme.)
Overall this is probably the best argument why not to distinguish. In
my work, I typically have only a few points and a large number of
vectors. If you have huge numbers of points in the same coordinate
system, it's way more efficient just to treat every point as if it were
a displacement vector.
You have largely convinced me. I think that the discussion is probably
just about over.
Thanks for your patience.
--
Thomas E. Vaughan
There are only two kinds of people; those who accept dogma and know it,
and those who accept dogma and don't know it. - G.K. Chesterton