ARB
arbdbt.h
Go to the documentation of this file.
1 #ifndef ARBDBT_H
2 #define ARBDBT_H
3 
4 #ifndef ARBDB_H
5 #include <arbdb.h>
6 #endif
7 #ifndef DOWNCAST_H
8 #include <downcast.h>
9 #endif
10 
11 #define gb_assert(cond) arb_assert(cond)
12 
13 #define GBT_SPECIES_INDEX_SIZE 10000L
14 #define GBT_SAI_INDEX_SIZE 1000L
15 
16 #define GB_GROUP_NAME_MAX 256
17 
18 #define DEFAULT_BRANCH_LENGTH 0.1
19 
20 #define ERROR_CONTAINER_PATH "tmp/message/pending"
21 
22 #define REMOTE_BASE "tmp/remote/"
23 #define MACRO_TRIGGER_CONTAINER REMOTE_BASE "trigger"
24 #define MACRO_TRIGGER_TERMINATED MACRO_TRIGGER_CONTAINER "/terminated"
25 #define MACRO_TRIGGER_RECORDING MACRO_TRIGGER_CONTAINER "/recording"
26 #define MACRO_TRIGGER_ERROR MACRO_TRIGGER_CONTAINER "/error"
27 #define MACRO_TRIGGER_TRACKED MACRO_TRIGGER_CONTAINER "/tracked"
28 
30 
35 
36  // please keep AWT_RemoveType in sync with GBT_TreeRemoveType
37  // see ../SL/AP_TREE/AP_Tree.hxx@sync_GBT_TreeRemoveType__AWT_RemoveType
38 
39  // combined defines:
41 };
42 
46 };
47 
48 enum TreeModel { ROOTED = 0, UNROOTED = 1 };
49 
50 CONSTEXPR_INLINE int nodes_2_edges(int nodes) { return nodes-1; }
51 CONSTEXPR_INLINE int edges_2_nodes(int nodes) { return nodes+1; }
52 
53 CONSTEXPR_INLINE int leafs_2_nodes(int leafs, TreeModel model) {
55  return 2*leafs-1-int(model);
56 }
57 CONSTEXPR_INLINE int nodes_2_leafs(int nodes, TreeModel model) {
59  return (nodes+1+int(model))/2;
60 }
61 CONSTEXPR_INLINE int leafs_2_edges(int leafs, TreeModel model) {
63  return nodes_2_edges(leafs_2_nodes(leafs, model));
64 }
65 CONSTEXPR_INLINE int edges_2_leafs(int edges, TreeModel model) {
67  return nodes_2_leafs(edges_2_nodes(edges), model);
68 }
69 
72  return leafs_2_nodes(leafs, model)-leafs;
73 }
76  return nodes-nodes_2_leafs(nodes, model);
77 }
78 
79 #define SRT_AUTOCORRECT_TREENAME " =:\n=:*=tree_*1:tree_tree_*=tree_*1"
80 #define SRT_AUTOCORRECT_ALINAME " =:\n=:*=ali_*1:ali_ali_*=ali_*1"
81 
82 typedef GB_ERROR (*species_callback)(GBDATA *gb_species, int *clientdata);
83 
84 #include <ad_t_prot.h>
85 
86 #define CHANGE_KEY_PATH "presets/key_data"
87 #define CHANGE_KEY_PATH_GENES "presets/gene_key_data"
88 #define CHANGE_KEY_PATH_EXPERIMENTS "presets/experiment_key_data"
89 
90 #define CHANGEKEY "key"
91 #define CHANGEKEY_NAME "key_name"
92 #define CHANGEKEY_TYPE "key_type"
93 #define CHANGEKEY_HIDDEN "key_hidden"
94 
95 
96 #else
97 #error arbdbt.h included twice
98 #endif
99 
100 
Definition: arbdbt.h:48
const char * GB_ERROR
Definition: arb_core.h:25
CONSTEXPR_INLINE int edges_2_nodes(int nodes)
Definition: arbdbt.h:51
GBT_TreeRemoveType
Definition: arbdbt.h:31
CONSTEXPR_INLINE int nodes_2_edges(int nodes)
Definition: arbdbt.h:50
TreeModel
Definition: arbdbt.h:48
CONSTEXPR_INLINE int nodes_2_innerNodes(int nodes, TreeModel model)
Definition: arbdbt.h:74
CONSTEXPR_INLINE int leafs_2_innerNodes(int leafs, TreeModel model)
Definition: arbdbt.h:70
GB_ERROR(* species_callback)(GBDATA *gb_species, int *clientdata)
Definition: arbdbt.h:82
CONSTEXPR_INLINE int leafs_2_nodes(int leafs, TreeModel model)
Definition: arbdbt.h:53
GBT_ORDER_MODE
Definition: arbdbt.h:43
CONSTEXPR_INLINE int leafs_2_edges(int leafs, TreeModel model)
Definition: arbdbt.h:61
#define CONSTEXPR_INLINE
Definition: cxxforward.h:92
GBT_RemarkType
Definition: arbdbt.h:29
CONSTEXPR_INLINE int edges_2_leafs(int edges, TreeModel model)
Definition: arbdbt.h:65
CONSTEXPR_INLINE int nodes_2_leafs(int nodes, TreeModel model)
Definition: arbdbt.h:57