7 if (!node->
name)
return 0;
32 search_group(node->get_leftson(), hash, groupcnt, myname, groups) +
33 search_group(node->get_rightson(), hash, groupcnt, myname, groups);
38 groups[groupcnt] =
new DI_ENTRY(myname,
this);
62 search_group(tree, hash, groupcnt,
NULp, groups);
67 found_groups =
new DI_ENTRY *[groupcnt];
68 memcpy(found_groups, groups, groupcnt*
sizeof(*groups));
84 memcpy(groups+nongroupcnt, found_groups, groupcnt*
sizeof(*groups));
85 delete [] found_groups;
95 groupcnt += nongroupcnt;
102 for (
size_t j=0; j<=i; j++) {
106 count.
set(x, y, count.
get(x, y)+1.0);
111 for (
size_t i=0; i<groupcnt; i++) {
112 for (
size_t j=0; j<=i; j++) {
115 sum->
set(i, j, sum->
get(i, j) / c);
130 allocated_entries = groupcnt;
long GBS_write_hash(GB_HASH *hs, const char *key, long val)
void set(size_t i, size_t j, T val)
void GBS_free_hash(GB_HASH *hs)
static void error(const char *msg)
DI_MATRIX_TYPE matrix_type
int GB_read_byte(GBDATA *gbd)
T get(size_t i, size_t j) const
char * compress(TreeNode *tree)
long GBS_read_hash(const GB_HASH *hs, const char *key)
GBDATA * GB_entry(GBDATA *father, const char *key)
GB_HASH * GBS_create_hash(long estimated_elements, GB_CASE case_sens)