-
Notifications
You must be signed in to change notification settings - Fork 0
/
itemtree.h
27 lines (23 loc) · 715 Bytes
/
itemtree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef ITEMTREE_H
#define ITEMTREE_H
#include "bitset.h"
typedef struct itemnode
{
int item;
bitset_t *bitset;
long count;
struct itemnode *right;
struct itemnode *down;
struct itemnode *up;
} itemnode_t;
void itemtree_insert_down(itemnode_t *parent, itemnode_t *child);
itemnode_t *itemtree_create(bitset_bag_t *bag, long minsup);
void itemtree_print(itemnode_t *root);
int itemtree_len(itemnode_t *root);
int itemtree_count(itemnode_t *root);
int itemtree_count_maximal(itemnode_t *root);
long itemtree_len_sum(itemnode_t *root);
long itemtree_maximal_len_sum(itemnode_t *root);
void itemtree_free(itemnode_t *root);
//void itemtree_free_keep_bitsets(itemnode_t *root);
#endif