source: tags/arb-6.0-rc1/CONSENSUS_TREE/CT_def.hxx

Last change on this file was 8507, checked in by westram, 12 years ago
  • use double for weights ([0..1] instead of [0..10000])
  • added tests using weights != 1
    • fixed weight/length calculation to make generated consense tree independent from used weight (as long as the same weight is used for all added trees)
  • no longer generates zero-bootstrap at root
    • strictly speaking it is wrong now (since the edge from virtual root to tree cant exist, ergo it's probability should be zero)
    • practically
      • that zero probability would be a special case (and is an error at all other edges)
      • a probability of 100% is used (which gets skipped when saving the tree)
File size: 1.0 KB
Line 
1// ============================================================= //
2//                                                               //
3//   File      : CT_def.hxx                                      //
4//   Purpose   :                                                 //
5//                                                               //
6//   Coded by Ralf Westram (coder@reallysoft.de) in March 2012   //
7//   Institute of Microbiology (Technical University Munich)     //
8//   http://www.arb-home.de/                                     //
9//                                                               //
10// ============================================================= //
11
12#ifndef CT_DEF_HXX
13#define CT_DEF_HXX
14
15// debug flags
16#if defined(DEBUG)
17#define NTREE_DEBUG_FUNCTIONS // debug function for NTREE
18// #define DUMP_PART_INIT
19// #define DUMP_PART_INSERTION
20#endif // DEBUG
21
22inline int double_cmp(double d1, const double d2) {
23    double d = d2-d1;
24    return d<0 ? -1 : (d>0 ? 1 : 0);
25}
26
27#else
28#error CT_def.hxx included twice
29#endif // CT_DEF_HXX
Note: See TracBrowser for help on using the repository browser.