X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=unweighted.cpp;h=2afc4a71486617b61308b651fef413895ba05b54;hb=6446d2e9713a95db5f772135b7aa3387f7ebf7bb;hp=8103688fb04d34542ee2174728d3399055a5d452;hpb=ca0785e447ca7aa7e2f0ab8bb1155db126b551ea;p=mothur.git diff --git a/unweighted.cpp b/unweighted.cpp index 8103688..2afc4a7 100644 --- a/unweighted.cpp +++ b/unweighted.cpp @@ -401,7 +401,7 @@ EstOutput Unweighted::driver(Tree* t, vector< vector > namesOfGroupCombo double totalBL = 0.00; //all branch lengths double UW = 0.00; //Unweighted Value = UniqueBL / totalBL; - for(int i=0;igetNumNodes();i++){ + for(int i=0;igetNumNodes();i++){ if (m->control_pressed) { return data; } @@ -411,15 +411,15 @@ EstOutput Unweighted::driver(Tree* t, vector< vector > namesOfGroupCombo int pcountSize = 0; for (int j = 0; j < namesOfGroupCombos[h].size(); j++) { - map::iterator itGroup = t->tree[i].pcount.find(namesOfGroupCombos[h][j]); - if (itGroup != t->tree[i].pcount.end()) { pcountSize++; if (pcountSize > 1) { break; } } + map::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()); } }