source:
branches/profile/SL/TREE_READ/TreeTools.cxx
Last change on this file was 11488, checked in by westram, 11 years ago | |
---|---|
File size: 1.6 KB |
Line | |
---|---|
1 | // ============================================================ // |
2 | // // |
3 | // File : TreeTools.cxx // |
4 | // Purpose : // |
5 | // // |
6 | // Institute of Microbiology (Technical University Munich) // |
7 | // www.arb-home.de // |
8 | // // |
9 | // ============================================================ // |
10 | |
11 | #include "TreeRead.h" |
12 | |
13 | void TREE_scale(GBT_TREE *tree, double length_scale, double bootstrap_scale) { // @@@ make a member of GBT_TREE? |
14 | if (tree->leftson) { |
15 | if (is_marked_as_default_len(tree->leftlen)) tree->leftlen = DEFAULT_BRANCH_LENGTH; |
16 | else tree->leftlen *= length_scale; |
17 | |
18 | TREE_scale(tree->leftson, length_scale, bootstrap_scale); |
19 | } |
20 | if (tree->rightson) { |
21 | if (is_marked_as_default_len(tree->rightlen)) tree->rightlen = DEFAULT_BRANCH_LENGTH; |
22 | else tree->rightlen *= length_scale; |
23 | |
24 | TREE_scale(tree->rightson, length_scale, bootstrap_scale); |
25 | } |
26 | |
27 | double bootstrap; |
28 | switch (tree->parse_bootstrap(bootstrap)) { |
29 | case REMARK_BOOTSTRAP: tree->set_bootstrap(bootstrap*bootstrap_scale); break; |
30 | case REMARK_OTHER: tree->remove_remark(); break; // remove non-bootstrap comments |
31 | case REMARK_NONE: break; |
32 | } |
33 | } |
34 | |
35 |
Note: See TracBrowser
for help on using the repository browser.