- data = estimate->getValues(shared1, shared2); //passes estimators a shared vector from each group to be compared
- //fills groupdata with datas info
- for (int i = 0; i < data.size(); i++) {
- groupData.push_back(data[i]);
+ data = estimate->getValues(shared); //passes estimators a shared vector from each group to be compared
+
+ //figure out what groups are being compared in getValues
+ //because we randomizes the order we need to put the results in the correct column in the output file
+ int group1Index, group2Index, pos;
+
+ vector<string> mGroups = m->getGroups();
+ for (int i = 0; i < mGroups.size(); i++) {
+ if (shared[0]->getGroup() == mGroups[i]) { group1Index = i; }
+ if (shared[1]->getGroup() == mGroups[i]) { group2Index = i; }
+ }
+
+ numGroupComb = 0;
+ int n = 1;
+ for (int i = 0; i < (numGroups - 1); i++) {
+ for (int l = n; l < numGroups; l++) {
+ if ((group1Index == i) && (group2Index == l)) {
+ pos = numGroupComb; //pos tells you which column in the output file you are in
+ }else if ((group1Index == l) && (group2Index == i)) {
+ pos = numGroupComb;
+ }
+ numGroupComb++;
+ }
+ n++;