weightedMean function

Compute the weighted arithmetic means of the particles.