ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
CRoaring.h

The sets of ADS as the bitmaps of CRoaring (https://github.com/RoaringBitmap/CRoaring), and back. More...

Files

file  ADS/interop/croaring/CRoaring.h
 The sets of ADS as the bitmaps of CRoaring (https://github.com/RoaringBitmap/CRoaring), and back: a program that keeps a RoaringBitmap hands it to a library that takes a roaring_bitmap_t (or a roaring::Roaring of its C++ interface), and reads one that such a library returns, e.g., to combine it with the other structures of ADS.

Functions

roaring_bitmap_t * ADS::toCRoaring (const RoaringBitmap &s)
 the set \( s \) as a new bitmap of CRoaring, which the caller frees by roaring_bitmap_free()
RoaringBitmap ADS::fromCRoaring (const roaring_bitmap_t *r)
 the bitmap \( r \) of CRoaring as a RoaringBitmap
roaring::Roaring ADS::toRoaring (const RoaringBitmap &s)
 the set \( s \) as a roaring::Roaring of the C++ interface of CRoaring
RoaringBitmap ADS::fromCRoaring (const roaring::Roaring &r)
 the roaring::Roaring \( r \) of the C++ interface of CRoaring as a RoaringBitmap

Detailed description

The sets of ADS as the bitmaps of CRoaring (https://github.com/RoaringBitmap/CRoaring), and back.

Function documentation

◆ fromCRoaring() [1/2]

RoaringBitmap ADS::fromCRoaring ( const roaring::Roaring & r)
inlinenodiscard

the roaring::Roaring \( r \) of the C++ interface of CRoaring as a RoaringBitmap

◆ fromCRoaring() [2/2]

RoaringBitmap ADS::fromCRoaring ( const roaring_bitmap_t * r)
inlinenodiscard

the bitmap \( r \) of CRoaring as a RoaringBitmap

Precondition
\( r \) not null

◆ toCRoaring()

roaring_bitmap_t * ADS::toCRoaring ( const RoaringBitmap & s)
inlinenodiscard

the set \( s \) as a new bitmap of CRoaring, which the caller frees by roaring_bitmap_free()

Exceptions
std::bad_allocif CRoaring cannot allocate it

◆ toRoaring()

roaring::Roaring ADS::toRoaring ( const RoaringBitmap & s)
inlinenodiscard

the set \( s \) as a roaring::Roaring of the C++ interface of CRoaring