|
Public Member Functions |
| weighted_variable_bitset (const weighted_variable_bitset &) |
| copy constructor
|
weighted_variable_bitset & | operator= (const weighted_variable_bitset &vb) |
| assignment operator
|
| weighted_variable_bitset () |
| default constructor
|
| ~weighted_variable_bitset () |
| destrcutor
|
bool | subseteq (const weighted_variable_bitset &b) const |
| Test whether this is a subset of another set.
|
bool | subseteq (const weighted_variable_bitset &, const unsigned int &J) const |
int | cardinality () |
| returns the number of elements contained in the set
|
float | weight () |
| sum of all weights associated with the elements contained in the set
|
void | intersect (const weighted_variable_bitset &b) |
| standard set intersection with adding weights associated with the elements that are contained in the resulting intersection
|
void | set (const int &j, const float &w) |
| add one element j to the set with associated weight w .
|
void | reset (const int &j, const float &w) |
| change the weight of element j; only needed for sets, not for multisets.
|
void | decrease (const int &j, const float &w) |
| only needed for compatibility with the multiset supporting classes
|
void | remove (const int &j, const float &w) |
| remove index j from the set.
|
bool | contains (const int &) |
| return true iff the element carrying the given index is present in the set.
|
bool | operator< (const weighted_variable_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 weighted_variable_bitset &) const |
| Two sets are considered equivalent iff they contain the same elements, not regarding their weights.
|
Public Attributes |
unsigned int * | bits |
float * | weights |
Static Public Attributes |
int | k = 128 |
| k corresponds to the number of bits and hence the number of sequence fragments in footprint_detector
|
int | k_ = 4 |
| k corresponds to the number of words needed to store all bits, i.e., k_ = k/32+1 (or (k>>5)+1) on a 32-bit machine.
|
bool | weighted = true |
| turn weighting features on and off.
|
Friends |
std::ostream & | operator<< (std::ostream &o, const weighted_variable_bitset &) |
This class particularly supports weighted sets of arbitrary cardinality, but no multiset capabilities.