1 | #ifndef SUBSET_H |
2 | #define SUBSET_H |
3 | |
4 | #include <cdt.h> |
5 | |
6 | typedef struct { |
7 | Dtlink_t link; |
8 | void* v; |
9 | } ptritem; |
10 | |
11 | typedef int (*walkfn)(void*, void*); |
12 | |
13 | extern Dt_t* mkSubset(void); |
14 | extern void addSubset(Dt_t*, void*); |
15 | extern void* inSubset(Dt_t*, void *); |
16 | extern void walkSubset(Dt_t*, walkfn, void*); |
17 | extern int sizeSubset(Dt_t*); |
18 | extern void clearSubset(Dt_t*); |
19 | extern void closeSubset(Dt_t*); |
20 | extern int intersect_size(Dt_t*, Dt_t*); |
21 | extern int union_size(Dt_t*, Dt_t*); |
22 | |
23 | #endif |
24 | |