PostgreSQL Source Code  git master
multibitmapset.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * multibitmapset.h
4  * Lists of Bitmapsets
5  *
6  * A multibitmapset is useful in situations where members of a set can
7  * be identified by two small integers; for example, varno and varattno
8  * of a group of Vars within a query. The implementation is a List of
9  * Bitmapsets, so that the empty set can be represented by NIL. (But,
10  * as with Bitmapsets, that's not the only allowed representation.)
11  * The zero-based index of a List element is the first identifying value,
12  * and the (also zero-based) index of a bit within that Bitmapset is
13  * the second identifying value. There is no expectation that the
14  * Bitmapsets should all be the same size.
15  *
16  * The available operations on multibitmapsets are intended to parallel
17  * those on bitmapsets, for example union and intersection. So far only
18  * a small fraction of that has been built out; we'll add more as needed.
19  *
20  *
21  * Copyright (c) 2022-2024, PostgreSQL Global Development Group
22  *
23  * src/include/nodes/multibitmapset.h
24  *
25  *-------------------------------------------------------------------------
26  */
27 #ifndef MULTIBITMAPSET_H
28 #define MULTIBITMAPSET_H
29 
30 #include "nodes/bitmapset.h"
31 #include "nodes/pg_list.h"
32 
33 extern List *mbms_add_member(List *a, int listidx, int bitidx);
34 extern List *mbms_add_members(List *a, const List *b);
35 extern List *mbms_int_members(List *a, const List *b);
36 extern bool mbms_is_member(int listidx, int bitidx, const List *a);
37 extern Bitmapset *mbms_overlap_sets(const List *a, const List *b);
38 
39 #endif /* MULTIBITMAPSET_H */
int b
Definition: isn.c:70
int a
Definition: isn.c:69
List * mbms_int_members(List *a, const List *b)
Bitmapset * mbms_overlap_sets(const List *a, const List *b)
bool mbms_is_member(int listidx, int bitidx, const List *a)
List * mbms_add_member(List *a, int listidx, int bitidx)
List * mbms_add_members(List *a, const List *b)
Definition: pg_list.h:54