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
12typedef struct IntegerSet IntegerSet;
13
14extern IntegerSet *intset_create(void);
15extern void intset_add_member(IntegerSet *intset, uint64 x);
16extern bool intset_is_member(IntegerSet *intset, uint64 x);
17
18extern uint64 intset_num_entries(IntegerSet *intset);
19extern uint64 intset_memory_usage(IntegerSet *intset);
20
21extern void intset_begin_iterate(IntegerSet *intset);
22extern bool intset_iterate_next(IntegerSet *intset, uint64 *next);
23
24#endif /* INTEGERSET_H */
25