+/**************************************************************************************************/
+vector<double> Weighted::getBranchLengthSums(Tree* t) {
+ try {
+
+ vector<double> sums;
+
+ for(int v=0;v<t->getNumLeaves();v++){
+
+ if (m->control_pressed) { return sums; }
+
+ int index = v;
+ double sum = 0.0000;
+
+ //while you aren't at root
+ while(t->tree[index].getParent() != -1){
+
+ //if you have a BL
+ if(t->tree[index].getBranchLength() != -1){
+ sum += abs(t->tree[index].getBranchLength());
+ }
+ index = t->tree[index].getParent();
+ }
+
+ //get last breanch length added
+ if(t->tree[index].getBranchLength() != -1){
+ sum += abs(t->tree[index].getBranchLength());
+ }
+
+ sums.push_back(sum);
+ }
+
+ return sums;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "Weighted", "getBranchLengthSums");
+ exit(1);
+ }
+}
+/**************************************************************************************************/