int numComp = 0;
vector< vector<string> > namesOfGroupCombos;
for (int r=0; r<numGroups; r++) {
- for (int l = r+1; l < numGroups; l++) {
+ for (int l = 0; l < r; l++) {
numComp++;
vector<string> groups; groups.push_back(globaldata->Groups[r]); groups.push_back(globaldata->Groups[l]);
namesOfGroupCombos.push_back(groups);
int numComp = 0;
vector< vector<string> > namesOfGroupCombos;
for (int r=0; r<numGroups; r++) {
- for (int l = r+1; l < numGroups; l++) {
+ for (int l = 0; l < r; l++) {
numComp++;
vector<string> groups; groups.push_back(globaldata->Groups[r]); groups.push_back(globaldata->Groups[l]);
namesOfGroupCombos.push_back(groups);
double totalBL = 0.00; //all branch lengths
double UW = 0.00; //Unweighted Value = UniqueBL / totalBL;
- for(int i=0;i<t->getNumNodes();i++){
+ for(int i=0;i<copyTree->getNumNodes();i++){
if (m->control_pressed) { return data; }
int pcountSize = 0;
for (int j = 0; j < namesOfGroupCombos[h].size(); j++) {
- map<string, int>::iterator itGroup = t->tree[i].pcount.find(namesOfGroupCombos[h][j]);
- if (itGroup != t->tree[i].pcount.end()) { pcountSize++; if (pcountSize > 1) { break; } }
+ map<string, int>::iterator itGroup = copyTree->tree[i].pcount.find(namesOfGroupCombos[h][j]);
+ if (itGroup != copyTree->tree[i].pcount.end()) { pcountSize++; if (pcountSize > 1) { break; } }
}
if (pcountSize == 0) { }
- else if ((t->tree[i].getBranchLength() != -1) && (pcountSize == 1)) { UniqueBL += abs(t->tree[i].getBranchLength()); }
+ else if ((copyTree->tree[i].getBranchLength() != -1) && (pcountSize == 1)) { UniqueBL += abs(copyTree->tree[i].getBranchLength()); }
- if ((t->tree[i].getBranchLength() != -1) && (pcountSize != 0)) {
- totalBL += abs(t->tree[i].getBranchLength());
+ if ((copyTree->tree[i].getBranchLength() != -1) && (pcountSize != 0)) {
+ totalBL += abs(copyTree->tree[i].getBranchLength());
}
}