Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

SparseBitvector Class Reference

A sparse bit vector, implemented as list of columns having value 1. More...

#include <SparseBitvector.hpp>

List of all members.

Public Member Functions

 SparseBitvector (int *values, int &length, int capacity)
 SparseBitvector wrapper around an ordinary array and length variable.
int length () const
int lengthpp ()
void setLength (int length)
void resize (int length)
int operator[] (int position) const
void setElement (int position, int value) const
void push_back (int column)
int * values () const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
iterator beginUnbounded ()
iterator endUnbounded ()
void resizeToEndOf (iterator &iter)
void resizeToEndOf (const_iterator &iter)
int capacity () const

Private Attributes

int *const m_values
int & m_length
int m_capacity

Classes

class  const_iterator
class  iterator


Detailed Description

A sparse bit vector, implemented as list of columns having value 1.

Author:
Lars Schmidt-Thieme
Version:
1.0

Definition at line 22 of file SparseBitvector.hpp.


Constructor & Destructor Documentation

SparseBitvector::SparseBitvector int *  values,
int &  length,
int  capacity
[inline]
 

SparseBitvector wrapper around an ordinary array and length variable.

SparseBitvector does not manage the memory, i.e., release the array after destruction.

Definition at line 29 of file SparseBitvector.hpp.


Member Function Documentation

const_iterator SparseBitvector::begin  )  const [inline]
 

Definition at line 285 of file SparseBitvector.hpp.

References m_length, and m_values.

iterator SparseBitvector::begin  )  [inline]
 

Definition at line 283 of file SparseBitvector.hpp.

References m_length, and m_values.

Referenced by cardinalityOfIntersection(), cardinalityOfSetdifference(), intersection(), and setdifference().

iterator SparseBitvector::beginUnbounded  )  [inline]
 

Definition at line 287 of file SparseBitvector.hpp.

References m_capacity, and m_values.

Referenced by intersection(), and setdifference().

int SparseBitvector::capacity  )  const [inline]
 

Definition at line 312 of file SparseBitvector.hpp.

References m_capacity.

Referenced by intersection(), and setdifference().

const_iterator SparseBitvector::end  )  const [inline]
 

Definition at line 286 of file SparseBitvector.hpp.

References m_length, and m_values.

iterator SparseBitvector::end  )  [inline]
 

Definition at line 284 of file SparseBitvector.hpp.

References m_length, and m_values.

Referenced by cardinalityOfIntersection(), cardinalityOfSetdifference(), intersection(), and setdifference().

iterator SparseBitvector::endUnbounded  )  [inline]
 

Definition at line 288 of file SparseBitvector.hpp.

References m_capacity, m_length, and m_values.

int SparseBitvector::length  )  const [inline]
 

Definition at line 34 of file SparseBitvector.hpp.

References m_length.

Referenced by cardinalityOfIntersection(), cardinalityOfSetdifference(), intersection(), operator<<(), and setdifference().

int SparseBitvector::lengthpp  )  [inline]
 

Definition at line 35 of file SparseBitvector.hpp.

References m_length.

int SparseBitvector::operator[] int  position  )  const [inline]
 

Definition at line 41 of file SparseBitvector.hpp.

References m_length, and m_values.

void SparseBitvector::push_back int  column  )  [inline]
 

Definition at line 51 of file SparseBitvector.hpp.

References m_capacity, m_length, and m_values.

void SparseBitvector::resize int  length  )  [inline]
 

Definition at line 40 of file SparseBitvector.hpp.

References setLength().

Referenced by resizeToEndOf().

void SparseBitvector::resizeToEndOf const_iterator iter  )  [inline]
 

Definition at line 291 of file SparseBitvector.hpp.

References SparseBitvector::const_iterator::index(), and resize().

void SparseBitvector::resizeToEndOf iterator iter  )  [inline]
 

Definition at line 290 of file SparseBitvector.hpp.

References SparseBitvector::iterator::index(), and resize().

Referenced by intersection(), and setdifference().

void SparseBitvector::setElement int  position,
int  value
const [inline]
 

Definition at line 46 of file SparseBitvector.hpp.

References m_capacity, and m_values.

void SparseBitvector::setLength int  length  )  [inline]
 

Definition at line 36 of file SparseBitvector.hpp.

References m_capacity, and m_length.

Referenced by main(), and resize().

int* SparseBitvector::values  )  const [inline]
 

Definition at line 56 of file SparseBitvector.hpp.

References m_values.


Member Data Documentation

int SparseBitvector::m_capacity [private]
 

Definition at line 321 of file SparseBitvector.hpp.

Referenced by beginUnbounded(), capacity(), endUnbounded(), push_back(), setElement(), and setLength().

int& SparseBitvector::m_length [private]
 

Definition at line 319 of file SparseBitvector.hpp.

Referenced by begin(), end(), endUnbounded(), length(), lengthpp(), operator[](), push_back(), and setLength().

int* const SparseBitvector::m_values [private]
 

Definition at line 318 of file SparseBitvector.hpp.

Referenced by begin(), beginUnbounded(), end(), endUnbounded(), operator[](), push_back(), setElement(), and values().


The documentation for this class was generated from the following file:
Generated on Sun Sep 17 17:55:39 2006 for FIM environment by  doxygen 1.4.4