#include <IntIndex.h>
Inheritance diagram for Tagcoll::IntIndex:
Public Member Functions | |
IntIndex () | |
IntIndex (const MasterMMapIndex &master, int idx) | |
const int * | data (int val) const |
size_t | size (int val) const |
size_t | size () const |
Protected Member Functions | |
int * | buf () const |
size_t | ofs (int val) const |
The layout is:
[offset of mapping for item 0, offset of mapping for item 1...] [size of array][sorted array of ints pointed by index 0] [size of array][sorted array of ints pointed by index 1] [size of array][sorted array of ints pointed by index 2] [...] [number of items in the mapping]
This allows fast lookups, as well as fast lookups of unions or intersections of mapped arrays.
The number of items for an ID not present in the index is assumed to be 0.
Tagcoll::IntIndex::IntIndex | ( | ) | [inline] |
Tagcoll::IntIndex::IntIndex | ( | const MasterMMapIndex & | master, | |
int | idx | |||
) | [inline] |
int* Tagcoll::IntIndex::buf | ( | ) | const [inline, protected] |
const int* Tagcoll::IntIndex::data | ( | int | val | ) | const [inline] |
size_t Tagcoll::IntIndex::ofs | ( | int | val | ) | const [inline, protected] |
size_t Tagcoll::IntIndex::size | ( | ) | const [inline] |
size_t Tagcoll::IntIndex::size | ( | int | val | ) | const [inline] |