|
Public Types |
typedef unsigned char | c_uint |
Public Member Functions |
| bit_multi_set (const bit_multi_set &) |
| copy constructor
|
bit_multi_set & | operator= (const bit_multi_set &vb) |
| assignment operator
|
| bit_multi_set () |
| default constructor
|
| ~bit_multi_set () |
| destrcutor
|
bool | subseteq (const bit_multi_set &) const |
| Test whether this is a subset of another multiset.
|
bool | subseteq (const bit_multi_set &, const unsigned int &J) const |
bool | operator< (const bit_multi_set &) 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 bit_multi_set &) const |
| Two sets are considered equivalent iff they contain the same elements, not regarding their weights.
|
int | cardinality () |
| returns the number of elements contained in the multiset
|
float | weight () |
| in the simple form implemented here, the weight is equal to the number of elements contained in the multiset.
|
void | intersect (const bit_multi_set &b) |
| standard multiset intersection
|
void | set (const int &j, const float &w) |
| add one element j to the multiset.
|
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) |
| remove ONE element j from the multiset.
|
void | remove (const int &j, const float &w) |
| remove ALL elements j from the multiset.
|
bool | contains (const int &) |
| is there at least one element with the index passed by the parameter?
|
Public Attributes |
c_uint * | counts |
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
|
bool | weighted = true |
| left for compatibility reasons with other set types
|
int | k_ = 4 |
Friends |
std::ostream & | operator<< (std::ostream &o, const bit_multi_set &) |
This class particularly supports unweighted sets whose cardinality is unlimited. It supports multiset capabilities, but is far less memory efficient than the simple-set versions.