Re: [eigen] Eigen appears to rock.

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


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



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