6
struct gbs_hash_struct;
8
extern gbs_hash_struct *Name_hash;
11
void hash_print(void);
13
void hash_settreecount(int tree_count);
15
PART *hash_getpart(void);
16
void hash_insert(PART *part, int weight);
17
void build_sorted_list(void);
1
// =============================================================== //
3
// File : CT_hash.hxx //
6
// Institute of Microbiology (Technical University Munich) //
7
// http://www.arb-home.de/ //
9
// =============================================================== //
15
#include "CT_part.hxx"
20
#ifndef _GLIBCXX_VECTOR
24
typedef PART *PARTptr;
25
typedef std::set<PARTptr, bool (*)(const PART *, const PART *)> PartSet;
26
typedef std::vector<PARTptr> PartVector;
28
inline bool topological_less(const PART *p1, const PART *p2) { return p1->topological_cmp(p2)<0; }
30
class PartRegistry : virtual Noncopyable {
32
PartSet artificial_parts; // these occurred in no tree
36
bool registration_phase() const { return sorted.empty(); }
37
bool retrieval_phase() const { return !registration_phase(); }
39
void merge_artificial_parts();
43
: parts(topological_less),
44
artificial_parts(topological_less),
47
arb_assert(registration_phase());
51
void put_part_from_complete_tree(PART*& part);
52
void put_part_from_partial_tree(PART*& part, const PART *partialTree);
53
void put_artificial_part(PART*& part);
55
void build_sorted_list(double overall_weight);
59
if (registration_phase()) return parts.size()+artificial_parts.size();
65
#error CT_hash.hxx included twice