Tagcoll::IntIndex Class Reference

MMap-based index of a -> [x1, x2, x3] mappings. More...

#include <IntIndex.h>

Inheritance diagram for Tagcoll::IntIndex:

Inheritance graph
[legend]
Collaboration diagram for Tagcoll::IntIndex:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

MMap-based index of a -> [x1, x2, x3] mappings.

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.


Constructor & Destructor Documentation

Tagcoll::IntIndex::IntIndex (  )  [inline]

Tagcoll::IntIndex::IntIndex ( const MasterMMapIndex master,
int  idx 
) [inline]


Member Function Documentation

int* Tagcoll::IntIndex::buf (  )  const [inline, protected]

size_t Tagcoll::IntIndex::ofs ( int  val  )  const [inline, protected]

const int* Tagcoll::IntIndex::data ( int  val  )  const [inline]

size_t Tagcoll::IntIndex::size ( int  val  )  const [inline]

size_t Tagcoll::IntIndex::size (  )  const [inline]


The documentation for this class was generated from the following file:
Generated on Sat Jan 17 04:45:17 2009 for libtagcoll by  doxygen 1.5.1