1 | // =========================================================== // |
---|
2 | // // |
---|
3 | // File : awt_tree_cmp.hxx // |
---|
4 | // Purpose : // |
---|
5 | // // |
---|
6 | // Institute of Microbiology (Technical University Munich) // |
---|
7 | // http://www.arb-home.de/ // |
---|
8 | // // |
---|
9 | // =========================================================== // |
---|
10 | |
---|
11 | #ifndef AWT_TREE_CMP_HXX |
---|
12 | #define AWT_TREE_CMP_HXX |
---|
13 | |
---|
14 | |
---|
15 | class AP_tree; |
---|
16 | class AWT_species_set; |
---|
17 | |
---|
18 | class AWT_species_set_root { |
---|
19 | long species_counter; |
---|
20 | long nsets; |
---|
21 | AWT_species_set **sets; |
---|
22 | int diff_bits[256]; |
---|
23 | |
---|
24 | public: |
---|
25 | long mstatus; |
---|
26 | long status; // temporary variables for status |
---|
27 | long nspecies; |
---|
28 | GBDATA *gb_main; |
---|
29 | GB_HASH *species_hash; |
---|
30 | |
---|
31 | // REAL PUBLIC |
---|
32 | AWT_species_set_root(GBDATA *gb_main,long nspecies); |
---|
33 | ~AWT_species_set_root(); |
---|
34 | |
---|
35 | void add(const char *species_name); // max nspecies |
---|
36 | void add(AWT_species_set *set); // max 2 * nspecies !!! |
---|
37 | AWT_species_set *search(AWT_species_set *set,long *best_cost); |
---|
38 | int search(AWT_species_set *set,FILE *log_file); // set's best_cost & best_node |
---|
39 | GB_ERROR copy_node_infos(FILE *log, bool delete_old_nodes, bool nodes_with_marked_only); |
---|
40 | AWT_species_set *find_best_matches_info(AP_tree *tree_source, FILE *log, bool setinner_node); |
---|
41 | AWT_species_set *move_tree_2_ssr(AP_tree *node); |
---|
42 | }; |
---|
43 | |
---|
44 | |
---|
45 | class AWT_species_set { |
---|
46 | public: |
---|
47 | unsigned char *bitstring; |
---|
48 | int unfound_species_count; |
---|
49 | double best_cost; |
---|
50 | AP_tree *best_node; |
---|
51 | AP_tree *node; |
---|
52 | // REAL PUBLIC: |
---|
53 | |
---|
54 | AWT_species_set(AP_tree *node,AWT_species_set_root *ssr,char *species_name); |
---|
55 | AWT_species_set(AP_tree *node,AWT_species_set_root *ssr,AWT_species_set *l,AWT_species_set *r); // or of two subsets |
---|
56 | ~AWT_species_set(); |
---|
57 | }; |
---|
58 | |
---|
59 | |
---|
60 | void AWT_move_info(GBDATA *gb_main, const char *tree_source,const char *tree_dest,const char *log_file, bool compare_node_info, bool overwrite_old_nodes, bool nodes_with_marked_only); |
---|
61 | |
---|
62 | #else |
---|
63 | #error awt_tree_cmp.hxx included twice |
---|
64 | #endif // AWT_TREE_CMP_HXX |
---|