for (T particle : distribution.getDomain()) {
final double particleWeight = distribution.getFraction(particle);
// stupid hack for a java bug
final Object pobj = particle;
Preconditions.checkState(pobj instanceof GaussianArHpWfParticle);
GaussianArHpWfParticle gParticle = (GaussianArHpWfParticle) pobj;
MultivariateGaussian state = gParticle.getState();
stateAvg.accumulate(state.getMean().scale(particleWeight));
MultivariateGaussian psi = gParticle.getPsiSS();
psiAvg.accumulate(psi.getMean().scale(particleWeight));
double sigma2Mean = gParticle.getSigma2SS().getMean();
sigma2Avg.accumulate(new MutableDouble(sigma2Mean * particleWeight));
}
this.stateLastMean = stateAvg.getSum();