// Decompose \sigma_{k} in the outer loop
Cholesky choltmp = new Cholesky(sig[k]);
lndets[k] = choltmp.logdet();
for (n=0;n<nn;n++) {
for (m=0;m<mm;m++) u[m] = data[n][m]-means[k][m];
choltmp.elsolve(u,v);
for (sum=0.,m=0; m<mm; m++) sum += SQR(v[m]);
resp[n][k] = -0.5*(sum + lndets[k]) + log(frac[k]);
}
}
loglike = 0;