sps Namespace Reference

The sps (SParseSet) namespace contains all classes and functions of the SparseSet project. More...


Classes

class  BitList
 Implementation of the BitSet interface based on a linked list. More...
class  BitTree
 Implementation of the BitSet interface based on a binary tree. More...
class  DenseBitVector
 Implementation of the BitSet interface based on a dynamic vector. More...
class  Dummy
 Dummy implementation of the BitSet interface. More...
class  Iterator
 Declaration of the sps::Iterator interface. More...
class  RiceSet
 Implementation of the BitSet interface based on the sparse set representation by Preston Briggs and Linda Torczon (Rice University). More...
class  SparseBitVector
 Implementation of the BitSet interface based on a sparse vector. More...
class  SparseSetTest
 A class for running sparse set tests. More...

Functions

template<class T>
size_t sizeof_bits ()
 Template function to determine the size of a type in bits.
size_t lg (size_t nValue)
 Returns the binary logarithm of nValue.


Detailed Description

The sps (SParseSet) namespace contains all classes and functions of the SparseSet project.

Function Documentation

size_t sps::lg ( size_t  nValue  )  [inline]

Returns the binary logarithm of nValue.

This function calculates the binary logarithm of nValue. It's an interger function and will therefore not always return the accurate value but the nearest integer not less than the binary logarithm of nValue. The runtime of sps::lg(n) is in O(lg(n)).

Examples:

template<class T>
size_t sps::sizeof_bits (  )  [inline]

Template function to determine the size of a type in bits.

This little helper function returns the size of a type in bits. The runtime of this function is 0, because the compiler can determine the result already at compile time.

Examples:


Generated on Wed Jun 20 21:20:43 2007 for SparseSet by  doxygen 1.5.2