ArrayList<CoVarMatrix> cvm3 = new ArrayList<CoVarMatrix>();
for(int i=0;i<temp.tableSize();i++){
Matrix uMinusu2 = new Matrix(uMinusNewU.get(i).getMeanMatrix());
double[][] tmp = (uMinusu2.transpose()).times(uMinusu2).times(prob[i]).getArray();
CoVarMatrix cv = new CoVarMatrix();
cv.setCoVarMatrix(tmp);
cvm3.add(cv);
}
temp.setCoVarMatrices(cvm3);