+}
+/**************************************************************************************************/
+
+EstOutput Unweighted::getValues(Tree* t, string groupA, string groupB, int p, string o) {
+ try {
+ globaldata = GlobalData::getInstance();
+ processors = p;
+ outputDir = o;
+
+
+ //if the users enters no groups then give them the score of all groups
+ int numGroups = globaldata->Groups.size();
+
+ //calculate number of comparsions
+ int numComp = 0;
+ vector< vector<string> > namesOfGroupCombos;
+ for (int r=0; r<numGroups; r++) {
+ for (int l = r+1; l < numGroups; l++) {
+ numComp++;
+ vector<string> groups; groups.push_back(globaldata->Groups[r]); groups.push_back(globaldata->Groups[l]);
+ namesOfGroupCombos.push_back(groups);
+ }
+ }
+
+ if (numComp != 1) {
+ vector<string> groups;
+ if (numGroups == 0) {
+ //get score for all users groups
+ for (int i = 0; i < tmap->namesOfGroups.size(); i++) {
+ if (tmap->namesOfGroups[i] != "xxx") {
+ groups.push_back(tmap->namesOfGroups[i]);
+ }
+ }
+ namesOfGroupCombos.push_back(groups);
+ }else {
+ for (int i = 0; i < globaldata->Groups.size(); i++) {
+ groups.push_back(globaldata->Groups[i]);
+ }
+ namesOfGroupCombos.push_back(groups);
+ }
+ }
+
+ #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+ if(processors == 1){
+ data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size(), true);
+ }else{
+ int numPairs = namesOfGroupCombos.size();
+
+ int numPairsPerProcessor = numPairs / processors;
+
+ for (int i = 0; i < processors; i++) {
+ int startPos = i * numPairsPerProcessor;
+ if(i == processors - 1){
+ numPairsPerProcessor = numPairs - i * numPairsPerProcessor;
+ }
+ lines.push_back(linePair(startPos, numPairsPerProcessor));
+ }
+
+ data = createProcesses(t, namesOfGroupCombos, true);
+
+ lines.clear();
+ }
+ #else
+ data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size(), true);
+ #endif
+
+ return data;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "Unweighted", "getValues");