bbq Implementation Documentation
Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | File Members

bbq::uint64_bitset Class Reference

This class provides one possible way of handling sets, which is a major part of the algorithms underlying bbq. More...

#include <bitsets.h>

List of all members.

Public Member Functions

 uint64_bitset ()
bool subseteq (const uint64_bitset &)
bool operator< (const uint64_bitset &) const
 We obtain a canonical order on subsets of [1:k] by considering such a set as a number between 0 and 2^k-1.

bool operator== (const uint64_bitset &) const
 Two sets are considered equivalent iff they contain the same elements, not regarding their weights.

int cardinality ()
void intersect (const uint64_bitset &b)
void set (const int &j)
void remove (const int &j)

Static Public Attributes

int k = 64

Friends

std::ostream & operator<< (std::ostream &o, const uint64_bitset &)


Detailed Description

This class provides one possible way of handling sets, which is a major part of the algorithms underlying bbq.

This class particularly supports unweighted sets whose cardinality is limited to 64 elements; it supports neither weighing nor multiset capabilities, but is very memory efficient.

For a brief documentation of the individual members, we refer to uint_bitset.


Constructor & Destructor Documentation

bbq::uint64_bitset::uint64_bitset  )  [inline]
 


Member Function Documentation

int bbq::uint64_bitset::cardinality  ) 
 

void bbq::uint64_bitset::intersect const uint64_bitset b  ) 
 

bool bbq::uint64_bitset::operator< const uint64_bitset  )  const
 

We obtain a canonical order on subsets of [1:k] by considering such a set as a number between 0 and 2^k-1.

This order is needed for inserting weighted sets into (multi-)sets for the enumerate_differences() method. Note that weightings are not taken into account; two sets containing the same elements but different weights are considered equivalent (which is the reason why they are stored in a multiset rather than a set).

bool bbq::uint64_bitset::operator== const uint64_bitset  )  const
 

Two sets are considered equivalent iff they contain the same elements, not regarding their weights.

this is needed for inserting weighted sets into (multi-)sets for the enumerate_differences() method. Note that weightings are not taken into account; two sets containing the same elements but different weights are considered equivalent (which is the reason why they are stored in a multiset rather than a set).

void bbq::uint64_bitset::remove const int &  j  ) 
 

void bbq::uint64_bitset::set const int &  j  ) 
 

bool bbq::uint64_bitset::subseteq const uint64_bitset  ) 
 


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  o,
const uint64_bitset I
[friend]
 


Member Data Documentation

int bbq::uint64_bitset::k = 64 [static]
 


The documentation for this class was generated from the following files:
bbq Implementation Documentation
Axel Mosig, Bioinformatics, University of Leipzig