Nagios
4.4.3
Dev docs for Nagios core and neb-module hackers
|
Go to the documentation of this file. 1 #ifndef LIBNAGIOS_bitmap_h__
2 #define LIBNAGIOS_bitmap_h__
13 typedef struct bitmap bitmap;
51 extern int bitmap_set(bitmap *bm,
unsigned long pos);
59 extern int bitmap_isset(
const bitmap *bm,
unsigned long pos);
74 #define bitmap_size bitmap_cardinality
116 extern bitmap *
bitmap_union(
const bitmap *a,
const bitmap *b);
124 extern bitmap *
bitmap_unite(bitmap *res,
const bitmap *addme);
136 extern bitmap *
bitmap_diff(
const bitmap *a,
const bitmap *b);
154 extern int bitmap_cmp(
const bitmap *a,
const bitmap *b);
bitmap * bitmap_union(const bitmap *a, const bitmap *b)
Calculate union of two bitmaps The union is defined as all bits that are members of A or B or both A ...
int bitmap_set(bitmap *bm, unsigned long pos)
Set a bit in the map.
bitmap * bitmap_create(unsigned long size)
Create a bitmaptor of size 'size'.
unsigned long bitmap_count_set_bits(const bitmap *bm)
Count set bits in map.
unsigned long bitmap_cardinality(const bitmap *bm)
Obtain cardinality (max number of elements) of the bitmaptor.
void bitmap_clear(bitmap *bm)
Unset all bits in a bitmap.
unsigned long bitmap_count_unset_bits(const bitmap *bm)
Count unset bits in map.
int bitmap_unset(bitmap *bm, unsigned long pos)
Unset a particular bit in the map.
bitmap * bitmap_unite(bitmap *res, const bitmap *addme)
Calculate union of two bitmaps and store result in one of them.
bitmap * bitmap_symdiff(const bitmap *a, const bitmap *b)
Calculate symmetric difference between two bitmaps The symmetric difference between A and B is the se...
bitmap * bitmap_copy(const bitmap *bm)
Copy a bitmaptor.
int bitmap_isset(const bitmap *bm, unsigned long pos)
Check if a particular bit is set in the map.
void bitmap_destroy(bitmap *bm)
Destroy a bitmaptor by freeing all the memory it uses.
bitmap * bitmap_diff(const bitmap *a, const bitmap *b)
Calculate set difference between two bitmaps The set difference of A / B is defined as all members of...
int bitmap_cmp(const bitmap *a, const bitmap *b)
Compare two bitmaps for equality.
int bitmap_resize(bitmap *bm, unsigned long size)
Resize a bitmap If the bitmap is made smaller, data will silently be lost.
bitmap * bitmap_intersect(const bitmap *a, const bitmap *b)
Calculate intersection of two bitmaps The intersection is defined as all bits that are members of bot...