1 | /* |
2 | * integerset.h |
3 | * In-memory data structure to hold a large set of integers efficiently |
4 | * |
5 | * Portions Copyright (c) 2012-2019, PostgreSQL Global Development Group |
6 | * |
7 | * src/include/lib/integerset.h |
8 | */ |
9 | #ifndef INTEGERSET_H |
10 | #define INTEGERSET_H |
11 | |
12 | typedef struct IntegerSet IntegerSet; |
13 | |
14 | extern IntegerSet *intset_create(void); |
15 | extern void intset_add_member(IntegerSet *intset, uint64 x); |
16 | extern bool intset_is_member(IntegerSet *intset, uint64 x); |
17 | |
18 | extern uint64 intset_num_entries(IntegerSet *intset); |
19 | extern uint64 intset_memory_usage(IntegerSet *intset); |
20 | |
21 | extern void intset_begin_iterate(IntegerSet *intset); |
22 | extern bool intset_iterate_next(IntegerSet *intset, uint64 *next); |
23 | |
24 | #endif /* INTEGERSET_H */ |
25 | |