+ processors = p;
+ outputDir = o;
+ TreeMap* tmap = t->getTreeMap();
+
+ //if the users enters no groups then give them the score of all groups
+ vector<string> mGroups = m->getGroups();
+ int numGroups = mGroups.size();
+
+ //calculate number of comparsions
+ int numComp = 0;
+ vector< vector<string> > namesOfGroupCombos;
+ for (int r=0; r<numGroups; r++) {
+ for (int l = 0; l < r; l++) {
+ numComp++;
+ vector<string> groups; groups.push_back(mGroups[r]); groups.push_back(mGroups[l]);
+ //cout << globaldata->Groups[r] << '\t' << globaldata->Groups[l] << endl;
+ namesOfGroupCombos.push_back(groups);
+ }
+ }
+
+ //numComp+1 for AB, AC, BC, ABC
+ if (numComp != 1) {
+ vector<string> groups;
+ if (numGroups == 0) {
+ //get score for all users groups
+ vector<string> tGroups = tmap->getNamesOfGroups();
+ for (int i = 0; i < tGroups.size(); i++) {
+ if (tGroups[i] != "xxx") {
+ groups.push_back(tGroups[i]);
+ //cout << tmap->namesOfGroups[i] << endl;
+ }
+ }
+ namesOfGroupCombos.push_back(groups);
+ }else {
+ for (int i = 0; i < mGroups.size(); i++) {
+ groups.push_back(mGroups[i]);
+ //cout << globaldata->Groups[i] << endl;
+ }
+ namesOfGroupCombos.push_back(groups);
+ }
+ }
+
+ #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
+ if(processors == 1){
+ data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size(), tmap);
+ }else{
+ lines.clear();
+ int numPairs = namesOfGroupCombos.size();