*
*/
+/* This class is designed to implement an integral form of the Cramer-von Mises statistic.
+ you may refer to the "Integration of Microbial Ecology and Statistics: A Test To Compare Gene Libraries"
+ paper in Applied and Environmental Microbiology, Sept. 2004, p. 5485-5492 0099-2240/04/$8.00+0
+ DOI: 10.1128/AEM.70.9.5485-5492.2004 Copyright 2004 American Society for Microbiology for more information. */
+
+
#include "libshuffcommand.h"
//**********************************************************************************************************************
//don't save AA to AA
if (i != j) {
//(Caa - Cab)^2
- deltaValues[p].push_back( (abs(cValues[p][i][i]-cValues[p][i][j]) * abs(cValues[p][i][i]-cValues[p][i][j])) );
+ deltaValues[p].push_back((cValues[p][i][i]-cValues[p][i][j]) * (cValues[p][i][i]-cValues[p][i][j]));
sumDelta[count] += deltaValues[p][count];
count++;
}
//don't save AA to AA
if (i != j) {
//(Caa - Cab)^2
- rsumDelta[count][m] += ((abs(cValues[p][i][i]-cValues[p][i][j]) * abs(cValues[p][i][i]-cValues[p][i][j])));
+ rsumDelta[count][m] += ((cValues[p][i][i]-cValues[p][i][j]) * (cValues[p][i][i]-cValues[p][i][j]));
count++;
}
}
}
}
-//cout << "iter " << m << endl;
+
//clear out old Values
reading->update(m);
cValues.clear();
-//cout << "random sum delta for iter " << m << endl;
-//for (int i = 0; i < rsumDelta.size(); i++) {
-// cout << setprecision(6) << rsumDelta[i][m] << '\t';
-//}
-//cout << endl;
-
}
reading->finish();