+ matrix->shuffle(globaldata->gGroupmap->namesOfGroups[i], globaldata->gGroupmap->namesOfGroups[j]);
+
+ min1 = matrix->getMins(count); //returns vector of mins for "box" requested ie. groups A, B, 0 = AA, 1 = AB, 2 = BA, 3 = BB;
+ min2 = matrix->getMins(count2); //returns vector of mins for "box" requested ie. groups A, B, 0 = AA, 1 = AB, 2 = BA, 3 = BB;
+
+ //find the coverage at this distance
+ sort(min1.begin(), min1.end());
+
+ //find the coverage at this distance
+ sort(min2.begin(), min2.end());
+
+ float distDiff = 0;
+
+ //loop through each distance and fill data
+ for (int k = 0; k < data.size(); k++) {
+ //****** coverage of AA **********//
+ int index = -1;
+ //find index in min where value is higher than d
+ for (int m = 0; m < min1.size(); m++) {
+ if (min1[m] > dist[k]) { index = m; break; }
+ }
+
+ // if you don't find one than all the mins are less than d
+ if (index == -1) { index = min1.size(); }
+
+ //****** coverage of AB **********//
+ int index2 = -1;
+ //find index in min where value is higher than d
+ for (int m = 0; m < min2.size(); m++) {
+ if (min2[m] > dist[k]) { index2 = m; break; }
+ }
+
+ // if you don't find one than all the mins are less than d
+ if (index2 == -1) { index2 = min2.size(); }