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

bbq::variable_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

 variable_bitset (const variable_bitset &)
 copy constructor

variable_bitsetoperator= (const variable_bitset &vb)
 assignment operator

 variable_bitset ()
 default constructor

 ~variable_bitset ()
 destrcutor

bool subseteq (const variable_bitset &) const
int cardinality ()
 returns the number of elements contained in the set

void intersect (const variable_bitset &b)
void set (const int &j)
void remove (const int &j)
bool operator< (const variable_bitset &)
 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 variable_bitset &)
 Two sets are considered equivalent iff they contain the same elements, not regarding their weights.


Static Public Attributes

int k = 128

Friends

std::ostream & operator<< (std::ostream &o, const variable_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 unlimited. It supports neither weighing nor multiset capabilities, but is more memory efficient than the weighted versions.

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


Constructor & Destructor Documentation

bbq::variable_bitset::variable_bitset const variable_bitset  ) 
 

copy constructor

bbq::variable_bitset::variable_bitset  ) 
 

default constructor

bbq::variable_bitset::~variable_bitset  )  [inline]
 

destrcutor


Member Function Documentation

int bbq::variable_bitset::cardinality  ) 
 

returns the number of elements contained in the set

void bbq::variable_bitset::intersect const variable_bitset b  ) 
 

bool bbq::variable_bitset::operator< const variable_bitset  ) 
 

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).

variable_bitset & bbq::variable_bitset::operator= const variable_bitset vb  ) 
 

assignment operator

bool bbq::variable_bitset::operator== const variable_bitset  ) 
 

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::variable_bitset::remove const int &  j  ) 
 

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

bool bbq::variable_bitset::subseteq const variable_bitset  )  const
 


Friends And Related Function Documentation

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


Member Data Documentation

int bbq::variable_bitset::k = 128 [static]
 


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