try {
processors = p;
outputDir = o;
- TreeMap* tmap = t->getTreeMap();
+ CountTable* ct = t->getCountTable();
//if the users enters no groups then give them the score of all groups
vector<string> mGroups = m->getGroups();
vector<string> groups;
if (numGroups == 0) {
//get score for all users groups
- vector<string> tGroups = tmap->getNamesOfGroups();
+ vector<string> tGroups = ct->getNamesOfGroups();
for (int i = 0; i < tGroups.size(); i++) {
if (tGroups[i] != "xxx") {
groups.push_back(tGroups[i]);
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
if(processors == 1){
- data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size(), tmap);
+ data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size(), ct);
}else{
lines.clear();
int numPairs = namesOfGroupCombos.size();
lines.push_back(linePair(startPos, numPairsPerProcessor));
}
- data = createProcesses(t, namesOfGroupCombos, tmap);
+ data = createProcesses(t, namesOfGroupCombos, ct);
}
#else
- data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size());
+ data = driver(t, namesOfGroupCombos, 0, namesOfGroupCombos.size(), ct);
#endif
return data;
}
/**************************************************************************************************/
-EstOutput Parsimony::createProcesses(Tree* t, vector< vector<string> > namesOfGroupCombos, TreeMap* tmap) {
+EstOutput Parsimony::createProcesses(Tree* t, vector< vector<string> > namesOfGroupCombos, CountTable* ct) {
try {
#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
int process = 1;
process++;
}else if (pid == 0){
EstOutput myresults;
- myresults = driver(t, namesOfGroupCombos, lines[process].start, lines[process].num, tmap);
+ myresults = driver(t, namesOfGroupCombos, lines[process].start, lines[process].num, ct);
if (m->control_pressed) { exit(0); }
}
}
- results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num, tmap);
+ results = driver(t, namesOfGroupCombos, lines[0].start, lines[0].num, ct);
//force parent to wait until all the processes are done
for (int i=0;i<processIDS.size();i++) {
}
}
/**************************************************************************************************/
-EstOutput Parsimony::driver(Tree* t, vector< vector<string> > namesOfGroupCombos, int start, int num, TreeMap* tmap) {
+EstOutput Parsimony::driver(Tree* t, vector< vector<string> > namesOfGroupCombos, int start, int num, CountTable* ct) {
try {
EstOutput results; results.resize(num);
- Tree* copyTree = new Tree(tmap);
+ Tree* copyTree = new Tree(ct);
int count = 0;
for (int h = start; h < (start+num); h++) {