From d9ec50b60719a907681a22acbe2469f1ea93facb Mon Sep 17 00:00:00 2001 From: westcott Date: Mon, 2 Mar 2009 13:27:01 +0000 Subject: [PATCH] fixed bug in unweighted --- unweighted.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/unweighted.cpp b/unweighted.cpp index 1ceca42..b038f38 100644 --- a/unweighted.cpp +++ b/unweighted.cpp @@ -77,7 +77,7 @@ EstOutput Unweighted::getValues(Tree* t) { //if i's chidren are leaves if (t->tree[rc].getRChild() == -1) { //if rc is a valid group and rc has a BL - if ((inUsersGroups(t->tree[rc].getGroup(), globaldata->Groups) == true) && (t->tree[rc].getBranchLength() != -1)) { + if ((inUsersGroups(t->tree[rc].getGroup(), groups) == true) && (t->tree[rc].getBranchLength() != -1)) { UniqueBL += t->tree[rc].getBranchLength(); totalBL += t->tree[rc].getBranchLength(); } @@ -85,7 +85,7 @@ EstOutput Unweighted::getValues(Tree* t) { if (t->tree[lc].getLChild() == -1) { //if lc is a valid group and lc has a BL - if ((inUsersGroups(t->tree[lc].getGroup(), globaldata->Groups) == true) && (t->tree[lc].getBranchLength() != -1)) { + if ((inUsersGroups(t->tree[lc].getGroup(), groups) == true) && (t->tree[lc].getBranchLength() != -1)) { UniqueBL += t->tree[lc].getBranchLength(); totalBL += t->tree[lc].getBranchLength(); } @@ -151,7 +151,7 @@ EstOutput Unweighted::getValues(Tree* t) { //if i's chidren are leaves if (t->tree[rc].getRChild() == -1) { //if rc is a valid group and rc has a BL - if ((inUsersGroups(t->tree[rc].getGroup(), globaldata->Groups) == true) && (t->tree[rc].getBranchLength() != -1)) { + if ((inUsersGroups(t->tree[rc].getGroup(), groups) == true) && (t->tree[rc].getBranchLength() != -1)) { UniqueBL += t->tree[rc].getBranchLength(); totalBL += t->tree[rc].getBranchLength(); } @@ -159,7 +159,7 @@ EstOutput Unweighted::getValues(Tree* t) { if (t->tree[lc].getLChild() == -1) { //if lc is a valid group and lc has a BL - if ((inUsersGroups(t->tree[lc].getGroup(), globaldata->Groups) == true) && (t->tree[lc].getBranchLength() != -1)) { + if ((inUsersGroups(t->tree[lc].getGroup(), groups) == true) && (t->tree[lc].getBranchLength() != -1)) { UniqueBL += t->tree[lc].getBranchLength(); totalBL += t->tree[lc].getBranchLength(); } @@ -263,7 +263,7 @@ EstOutput Unweighted::getValues(Tree* t, string groupA, string groupB) { //if i's chidren are leaves if (t->tree[rc].getRChild() == -1) { //if rc is a valid group and rc has a BL - if ((inUsersGroups(t->tree[rc].getGroup(), globaldata->Groups) == true) && (t->tree[rc].getBranchLength() != -1)) { + if ((inUsersGroups(t->tree[rc].getGroup(), groups) == true) && (t->tree[rc].getBranchLength() != -1)) { UniqueBL += t->tree[rc].getBranchLength(); totalBL += t->tree[rc].getBranchLength(); } @@ -271,7 +271,7 @@ EstOutput Unweighted::getValues(Tree* t, string groupA, string groupB) { if (t->tree[lc].getLChild() == -1) { //if lc is a valid group and lc has a BL - if ((inUsersGroups(t->tree[lc].getGroup(), globaldata->Groups) == true) && (t->tree[lc].getBranchLength() != -1)) { + if ((inUsersGroups(t->tree[lc].getGroup(), groups) == true) && (t->tree[lc].getBranchLength() != -1)) { UniqueBL += t->tree[lc].getBranchLength(); totalBL += t->tree[lc].getBranchLength(); } @@ -343,7 +343,7 @@ EstOutput Unweighted::getValues(Tree* t, string groupA, string groupB) { //if i's chidren are leaves if (t->tree[rc].getRChild() == -1) { //if rc is a valid group and rc has a BL - if ((inUsersGroups(t->tree[rc].getGroup(), globaldata->Groups) == true) && (t->tree[rc].getBranchLength() != -1)) { + if ((inUsersGroups(t->tree[rc].getGroup(), groups) == true) && (t->tree[rc].getBranchLength() != -1)) { UniqueBL += t->tree[rc].getBranchLength(); totalBL += t->tree[rc].getBranchLength(); } @@ -351,7 +351,7 @@ EstOutput Unweighted::getValues(Tree* t, string groupA, string groupB) { if (t->tree[lc].getLChild() == -1) { //if lc is a valid group and lc has a BL - if ((inUsersGroups(t->tree[lc].getGroup(), globaldata->Groups) == true) && (t->tree[lc].getBranchLength() != -1)) { + if ((inUsersGroups(t->tree[lc].getGroup(), groups) == true) && (t->tree[lc].getBranchLength() != -1)) { UniqueBL += t->tree[lc].getBranchLength(); totalBL += t->tree[lc].getBranchLength(); } -- 2.39.2