template<
std::integral value_t>
class seqan::hibf::counting_vector< value_t >
A data structure that behaves like a std::vector and can be used to consolidate the results of multiple calls to seqan::hibf::interleaved_bloom_filter::membership_agent_type::bulk_contains.
- Template Parameters
-
When using the seqan::hibf::interleaved_bloom_filter::membership_agent_type::bulk_contains operation, a common use case is to add up, for example, the results for all k-mers in a query. This yields, for each bin, the number of k-mers of a query that are in the respective bin. Such information can be used to apply further filtering or abundance estimation based on the k-mer counts.
The seqan::hibf::counting_vector offers an easy way to add up the individual seqan::hibf::bit_vector by offering an += operator.
The value_t template parameter should be chosen in a way that no overflow occurs if all calls to bulk_contains return a hit for a specific bin. For example, uint8_t will suffice when processing short Illumina reads, whereas long reads will require at least uint32_t.
Example
#include <hibf/misc/print.hpp>
int main()
{
auto agent = ibf.membership_agent();
counts += agent.bulk_contains(712);
seqan::hibf::print(counts);
counts += agent.bulk_contains(237);
seqan::hibf::print(counts);
counts += agent.bulk_contains(126);
seqan::hibf::print(counts);
counts += counts;
seqan::hibf::print(counts);
}
A data structure that behaves like a std::vector and can be used to consolidate the results of multip...
Definition counting_vector.hpp:146
The IBF binning directory. A data structure that efficiently answers set-membership queries for multi...
Definition interleaved_bloom_filter.hpp:144
Provides seqan::hibf::counting_vector.
Provides seqan::hibf::interleaved_bloom_filter.
A strong type that represents the number of bins for the seqan::hibf::interleaved_bloom_filter.
Definition interleaved_bloom_filter.hpp:41
A strong type that represents the bin index for the seqan::hibf::interleaved_bloom_filter.
Definition interleaved_bloom_filter.hpp:68
A strong type that represents the number of bits for each bin in the seqan::hibf::interleaved_bloom_f...
Definition interleaved_bloom_filter.hpp:50