Re: [eigen] Eigen appears to rock.
• To: eigen@xxxxxxxxxxxxxxxxxxx
• Subject: Re: [eigen] Eigen appears to rock.
• From: "Thomas Vaughan" <tevaughan@xxxxxxxxx>
• Date: Fri, 22 Aug 2008 09:53:04 -0600
• 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