SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
interleaved_bloom_filter.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
12#include <algorithm>
13#include <bit>
14
15#include <sdsl/bit_vectors.hpp>
16
19
20namespace seqan3
21{
29
32struct bin_count : public detail::strong_type<size_t, bin_count, detail::strong_type_skill::convert>
33{
34 using detail::strong_type<size_t, bin_count, detail::strong_type_skill::convert>::strong_type;
35};
36
39struct bin_size : public detail::strong_type<size_t, bin_size, detail::strong_type_skill::convert>
40{
41 using detail::strong_type<size_t, bin_size, detail::strong_type_skill::convert>::strong_type;
42};
43
46struct hash_function_count : public detail::strong_type<size_t, hash_function_count, detail::strong_type_skill::convert>
47{
48 using detail::strong_type<size_t, hash_function_count, detail::strong_type_skill::convert>::strong_type;
49};
50
53struct bin_index : public detail::strong_type<size_t, bin_index, detail::strong_type_skill::convert>
54{
55 using detail::strong_type<size_t, bin_index, detail::strong_type_skill::convert>::strong_type;
56};
57
129template <data_layout data_layout_mode_ = data_layout::uncompressed>
131{
132private:
134 template <data_layout data_layout_mode>
135 friend class interleaved_bloom_filter;
137
139 using data_type =
141
143 size_t bins{};
145 size_t technical_bins{};
147 size_t bin_size_{};
149 size_t hash_shift{};
151 size_t bin_words{};
153 size_t hash_funs{};
155 data_type data{};
157 static constexpr std::array<size_t, 5> hash_seeds{13'572'355'802'537'770'549ULL, // 2**64 / (e/2)
158 13'043'817'825'332'782'213ULL, // 2**64 / sqrt(2)
159 10'650'232'656'628'343'401ULL, // 2**64 / sqrt(3)
160 16'499'269'484'942'379'435ULL, // 2**64 / (sqrt(5)/2)
161 4'893'150'838'803'335'377ULL}; // 2**64 / (3*pi/5)
162
170 inline constexpr size_t hash_and_fit(size_t h, size_t const seed) const
171 {
172 h *= seed;
173 assert(hash_shift < 64);
174 h ^= h >> hash_shift; // XOR and shift higher bits into lower bits
175 h *= 11'400'714'819'323'198'485ULL; // = 2^64 / golden_ration, to expand h to 64 bit range
176 // Use fastrange (integer modulo without division) if possible.
177#ifdef __SIZEOF_INT128__
178 h = static_cast<uint64_t>((static_cast<__uint128_t>(h) * static_cast<__uint128_t>(bin_size_)) >> 64);
179#else
180 h %= bin_size_;
181#endif
182 h *= technical_bins;
183 return h;
184 }
185
186public:
188 static constexpr data_layout data_layout_mode = data_layout_mode_;
189
190 class membership_agent_type; // documented upon definition below
191
192 template <typename value_t>
193 class counting_agent_type; // documented upon definition below
194
204
219 seqan3::bin_size size,
222 {
223 bins = bins_.get();
224 bin_size_ = size.get();
225 hash_funs = funs.get();
226
227 if (bins == 0)
228 throw std::logic_error{"The number of bins must be > 0."};
229 if (hash_funs == 0 || hash_funs > 5)
230 throw std::logic_error{"The number of hash functions must be > 0 and <= 5."};
231 if (bin_size_ == 0)
232 throw std::logic_error{"The size of a bin must be > 0."};
233
234 hash_shift = std::countl_zero(bin_size_);
235 bin_words = (bins + 63) >> 6; // = ceil(bins/64)
236 technical_bins = bin_words << 6; // = bin_words * 64
237 data = sdsl::bit_vector(technical_bins * bin_size_);
238 }
239
250 {
251 std::tie(bins, technical_bins, bin_size_, hash_shift, bin_words, hash_funs) =
252 std::tie(ibf.bins, ibf.technical_bins, ibf.bin_size_, ibf.hash_shift, ibf.bin_words, ibf.hash_funs);
253
254 data = sdsl::bit_vector{ibf.data.begin(), ibf.data.end()};
255 }
256
270 {
271 std::tie(bins, technical_bins, bin_size_, hash_shift, bin_words, hash_funs) =
272 std::tie(ibf.bins, ibf.technical_bins, ibf.bin_size_, ibf.hash_shift, ibf.bin_words, ibf.hash_funs);
273
274 data = sdsl::sd_vector<>{ibf.data};
275 }
277
293 void emplace(size_t const value, bin_index const bin) noexcept
295 {
296 assert(bin.get() < bins);
297 for (size_t i = 0; i < hash_funs; ++i)
298 {
299 size_t idx = hash_and_fit(value, hash_seeds[i]);
300 idx += bin.get();
301 assert(idx < data.size());
302 data[idx] = 1;
303 };
304 }
305
317 void clear(bin_index const bin) noexcept
319 {
320 assert(bin.get() < bins);
321 for (size_t idx = bin.get(), i = 0; i < bin_size_; idx += technical_bins, ++i)
322 data[idx] = 0;
323 }
324
338 template <typename rng_t>
340 void clear(rng_t && bin_range) noexcept
341 {
342 static_assert(std::ranges::forward_range<rng_t>, "The range of bins to clear must model a forward_range.");
343 static_assert(std::same_as<std::remove_cvref_t<std::ranges::range_reference_t<rng_t>>, bin_index>,
344 "The reference type of the range to clear must be seqan3::bin_index.");
345#ifndef NDEBUG
346 for (auto && bin : bin_range)
347 assert(bin.get() < bins);
348#endif // NDEBUG
349
350 for (size_t offset = 0, i = 0; i < bin_size_; offset += technical_bins, ++i)
351 for (auto && bin : bin_range)
352 data[bin.get() + offset] = 0;
353 }
354
378 void increase_bin_number_to(bin_count const new_bins_)
380 {
381 size_t new_bins = new_bins_.get();
382
383 if (new_bins < bins)
384 throw std::invalid_argument{"The number of new bins must be >= the current number of bins."};
385
386 // Equivalent to ceil(new_bins / 64)
387 size_t new_bin_words = (new_bins + 63) >> 6;
388
389 bins = new_bins;
390
391 if (new_bin_words == bin_words) // No need for internal resize if bin_words does not change.
392 return;
393
394 size_t new_technical_bins = new_bin_words << 6;
395 size_t new_bits = bin_size_ * new_technical_bins;
396
397 size_t idx_{new_bits}, idx{data.size()};
398 size_t delta = new_technical_bins - technical_bins + 64;
399
400 data.resize(new_bits);
401
402 for (size_t i = idx_, j = idx; j > 0; i -= new_technical_bins, j -= technical_bins)
403 {
404 size_t stop = i - new_technical_bins;
405
406 for (size_t ii = i - delta, jj = j - 64; stop && ii >= stop; ii -= 64, jj -= 64)
407 {
408 uint64_t old = data.get_int(jj);
409 data.set_int(jj, 0);
410 data.set_int(ii, old);
411 }
412 }
413
414 bin_words = new_bin_words;
415 technical_bins = new_technical_bins;
416 }
418
434 {
435 return membership_agent_type{*this};
436 }
437
449 template <typename value_t = uint16_t>
455
462 size_t hash_function_count() const noexcept
463 {
464 return hash_funs;
465 }
466
470 size_t bin_count() const noexcept
471 {
472 return bins;
473 }
474
478 size_t bin_size() const noexcept
479 {
480 return bin_size_;
481 }
482
486 size_t bit_size() const noexcept
487 {
488 return data.size();
489 }
491
500 friend bool operator==(interleaved_bloom_filter const & lhs, interleaved_bloom_filter const & rhs) noexcept
501 {
502 return std::tie(lhs.bins,
503 lhs.technical_bins,
504 lhs.bin_size_,
505 lhs.hash_shift,
506 lhs.bin_words,
507 lhs.hash_funs,
508 lhs.data)
509 == std::tie(rhs.bins,
510 rhs.technical_bins,
511 rhs.bin_size_,
512 rhs.hash_shift,
513 rhs.bin_words,
514 rhs.hash_funs,
515 rhs.data);
516 }
517
523 friend bool operator!=(interleaved_bloom_filter const & lhs, interleaved_bloom_filter const & rhs) noexcept
524 {
525 return !(lhs == rhs);
526 }
528
539 constexpr data_type & raw_data() noexcept
540 {
541 return data;
542 }
543
545 constexpr data_type const & raw_data() const noexcept
546 {
547 return data;
548 }
550
558 template <cereal_archive archive_t>
559 void CEREAL_SERIALIZE_FUNCTION_NAME(archive_t & archive)
560 {
561 archive(bins);
562 archive(technical_bins);
563 archive(bin_size_);
564 archive(hash_shift);
565 archive(bin_words);
566 archive(hash_funs);
567 archive(data);
568 }
570};
571
582template <data_layout data_layout_mode>
584{
585private:
588
590 ibf_t const * ibf_ptr{nullptr};
591
592public:
593 class binning_bitvector;
594
604
609 explicit membership_agent_type(ibf_t const & ibf) : ibf_ptr(std::addressof(ibf)), result_buffer(ibf.bin_count())
610 {}
612
615
636 [[nodiscard]] binning_bitvector const & bulk_contains(size_t const value) & noexcept
637 {
638 assert(ibf_ptr != nullptr);
639 assert(result_buffer.size() == ibf_ptr->bin_count());
640
641 std::array<size_t, 5> bloom_filter_indices;
642 std::memcpy(&bloom_filter_indices, &ibf_ptr->hash_seeds, sizeof(size_t) * ibf_ptr->hash_funs);
643
644 for (size_t i = 0; i < ibf_ptr->hash_funs; ++i)
645 bloom_filter_indices[i] = ibf_ptr->hash_and_fit(value, bloom_filter_indices[i]);
646
647 for (size_t batch = 0; batch < ibf_ptr->bin_words; ++batch)
648 {
649 size_t tmp{-1ULL};
650 for (size_t i = 0; i < ibf_ptr->hash_funs; ++i)
651 {
652 assert(bloom_filter_indices[i] < ibf_ptr->data.size());
653 tmp &= ibf_ptr->data.get_int(bloom_filter_indices[i]);
654 bloom_filter_indices[i] += 64;
655 }
656
657 result_buffer.data.set_int(batch << 6, tmp);
658 }
659
660 return result_buffer;
661 }
662
663 // `bulk_contains` cannot be called on a temporary, since the object the returned reference points to
664 // is immediately destroyed.
665 [[nodiscard]] binning_bitvector const & bulk_contains(size_t const value) && noexcept = delete;
667};
668
670template <data_layout data_layout_mode>
672{
673private:
675 using data_type = sdsl::bit_vector;
677 data_type data{};
678
679 friend class membership_agent_type;
680
681public:
685 binning_bitvector() = default;
690 ~binning_bitvector() = default;
691
693 explicit binning_bitvector(size_t const size) : data(size)
694 {}
696
698 size_t size() const noexcept
699 {
700 return data.size();
701 }
702
707 auto begin() noexcept
708 {
709 return data.begin();
710 }
711
713 auto begin() const noexcept
714 {
715 return data.begin();
716 }
717
719 auto end() noexcept
720 {
721 return data.end();
722 }
723
725 auto end() const noexcept
726 {
727 return data.end();
728 }
730
735 friend bool operator==(binning_bitvector const & lhs, binning_bitvector const & rhs) noexcept
736 {
737 return lhs.data == rhs.data;
738 }
739
741 friend bool operator!=(binning_bitvector const & lhs, binning_bitvector const & rhs) noexcept
742 {
743 return !(lhs == rhs);
744 }
746
751 auto operator[](size_t const i) noexcept
752 {
753 assert(i < size());
754 return data[i];
755 }
756
758 auto operator[](size_t const i) const noexcept
759 {
760 assert(i < size());
761 return data[i];
762 }
763
771 constexpr data_type & raw_data() noexcept
772 {
773 return data;
774 }
775
777 constexpr data_type const & raw_data() const noexcept
778 {
779 return data;
780 }
782};
783
807template <std::integral value_t>
808class counting_vector : public std::vector<value_t>
809{
810private:
813
815 template <typename binning_bitvector_t>
816 static constexpr bool is_binning_bitvector =
817 std::same_as<binning_bitvector_t,
819 || std::same_as<binning_bitvector_t,
821
822public:
826 counting_vector() = default;
827 counting_vector(counting_vector const &) = default;
831 ~counting_vector() = default;
832
833 using base_t::base_t;
835
848 template <typename binning_bitvector_t>
849 requires is_binning_bitvector<binning_bitvector_t>
850 counting_vector & operator+=(binning_bitvector_t const & binning_bitvector)
851 {
852 for_each_set_bin(binning_bitvector,
853 [this](size_t const bin)
854 {
855 ++(*this)[bin];
856 });
857 return *this;
858 }
859
867 template <typename binning_bitvector_t>
868 requires is_binning_bitvector<binning_bitvector_t>
869 counting_vector & operator-=(binning_bitvector_t const & binning_bitvector)
870 {
871 for_each_set_bin(binning_bitvector,
872 [this](size_t const bin)
873 {
874 assert((*this)[bin] > 0);
875 --(*this)[bin];
876 });
877 return *this;
878 }
879
891 {
892 assert(this->size() >= rhs.size()); // The counting vector may be bigger than what we need.
893
894 std::transform(this->begin(), this->end(), rhs.begin(), this->begin(), std::plus<value_t>());
895
896 return *this;
897 }
898
904 {
905 assert(this->size() >= rhs.size()); // The counting vector may be bigger than what we need.
906
907 std::transform(this->begin(),
908 this->end(),
909 rhs.begin(),
910 this->begin(),
911 [](auto a, auto b)
912 {
913 assert(a >= b);
914 return a - b;
915 });
916
917 return *this;
918 }
919
920private:
922 template <typename binning_bitvector_t, typename on_bin_fn_t>
923 void for_each_set_bin(binning_bitvector_t && binning_bitvector, on_bin_fn_t && on_bin_fn)
924 {
925 assert(this->size() >= binning_bitvector.size()); // The counting vector may be bigger than what we need.
926
927 // Jump to the next 1 and return the number of places jumped in the bit_sequence
928 auto jump_to_next_1bit = [](size_t & x)
929 {
930 auto const zeros = std::countr_zero(x);
931 x >>= zeros; // skip number of zeros
932 return zeros;
933 };
934
935 // Each iteration can handle 64 bits
936 for (size_t bit_pos = 0; bit_pos < binning_bitvector.size(); bit_pos += 64)
937 {
938 // get 64 bits starting at position `bit_pos`
939 size_t bit_sequence = binning_bitvector.raw_data().get_int(bit_pos);
940
941 // process each relative bin inside the bit_sequence
942 for (size_t bin = bit_pos; bit_sequence != 0u; ++bin, bit_sequence >>= 1)
943 {
944 // Jump to the next 1 and
945 bin += jump_to_next_1bit(bit_sequence);
946
947 on_bin_fn(bin);
948 }
949 }
950 }
951};
952
962template <data_layout data_layout_mode>
963template <typename value_t>
965{
966private:
967 static_assert(std::integral<value_t>, "The value type must model std::integral.");
968
971
973 ibf_t const * ibf_ptr{nullptr};
974
977
978public:
988
993 explicit counting_agent_type(ibf_t const & ibf) :
994 ibf_ptr(std::addressof(ibf)),
995 membership_agent(ibf),
996 result_buffer(ibf.bin_count())
997 {}
999
1002
1025 template <std::ranges::range value_range_t>
1026 [[nodiscard]] counting_vector<value_t> const & bulk_count(value_range_t && values) & noexcept
1027 {
1028 assert(ibf_ptr != nullptr);
1029 assert(result_buffer.size() == ibf_ptr->bin_count());
1030
1031 static_assert(std::ranges::input_range<value_range_t>, "The values must model input_range.");
1032 static_assert(std::unsigned_integral<std::ranges::range_value_t<value_range_t>>,
1033 "An individual value must be an unsigned integral.");
1034
1035 std::ranges::fill(result_buffer, 0);
1036
1037 for (auto && value : values)
1038 result_buffer += membership_agent.bulk_contains(value);
1039
1040 return result_buffer;
1041 }
1042
1043 // `bulk_count` cannot be called on a temporary, since the object the returned reference points to
1044 // is immediately destroyed.
1045 template <std::ranges::range value_range_t>
1046 [[nodiscard]] counting_vector<value_t> const & bulk_count(value_range_t && values) && noexcept = delete;
1048};
1049
1050} // namespace seqan3
Adaptions of concepts from the Cereal library.
A data structure that behaves like a std::vector and can be used to consolidate the results of multip...
Definition interleaved_bloom_filter.hpp:809
counting_vector & operator+=(counting_vector const &rhs)
Bin-wise addition of two seqan3::counting_vectors.
Definition interleaved_bloom_filter.hpp:890
counting_vector & operator=(counting_vector const &)=default
Defaulted.
counting_vector & operator=(counting_vector &&)=default
Defaulted.
counting_vector & operator+=(binning_bitvector_t const &binning_bitvector)
Bin-wise adds the bits of a seqan3::interleaved_bloom_filter::membership_agent_type::binning_bitvecto...
Definition interleaved_bloom_filter.hpp:850
counting_vector(counting_vector const &)=default
Defaulted.
~counting_vector()=default
Defaulted.
counting_vector(counting_vector &&)=default
Defaulted.
counting_vector & operator-=(binning_bitvector_t const &binning_bitvector)
Bin-wise subtracts the bits of a seqan3::interleaved_bloom_filter::membership_agent_type::binning_bit...
Definition interleaved_bloom_filter.hpp:869
counting_vector()=default
Defaulted.
counting_vector & operator-=(counting_vector const &rhs)
Bin-wise substraction of two seqan3::counting_vectors.
Definition interleaved_bloom_filter.hpp:903
Manages counting ranges of values for the seqan3::interleaved_bloom_filter.
Definition interleaved_bloom_filter.hpp:965
counting_vector< value_t > const & bulk_count(value_range_t &&values) &noexcept
Counts the occurrences in each bin for all values in a range.
Definition interleaved_bloom_filter.hpp:1026
counting_agent_type(counting_agent_type &&)=default
Defaulted.
counting_agent_type(counting_agent_type const &)=default
Defaulted.
counting_vector< value_t > const & bulk_count(value_range_t &&values) &&noexcept=delete
Counts the occurrences in each bin for all values in a range.
counting_agent_type & operator=(counting_agent_type const &)=default
Defaulted.
counting_vector< value_t > result_buffer
Stores the result of bulk_count().
Definition interleaved_bloom_filter.hpp:1001
counting_agent_type & operator=(counting_agent_type &&)=default
Defaulted.
A bitvector representing the result of a call to bulk_contains of the seqan3::interleaved_bloom_filte...
Definition interleaved_bloom_filter.hpp:672
constexpr data_type & raw_data() noexcept
Provides direct, unsafe access to the underlying data structure.
Definition interleaved_bloom_filter.hpp:771
auto end() noexcept
Returns an iterator to the element following the last element of the container.
Definition interleaved_bloom_filter.hpp:719
constexpr data_type const & raw_data() const noexcept
Provides direct, unsafe access to the underlying data structure.
Definition interleaved_bloom_filter.hpp:777
binning_bitvector(binning_bitvector const &)=default
Defaulted.
auto end() const noexcept
Returns an iterator to the element following the last element of the container.
Definition interleaved_bloom_filter.hpp:725
auto operator[](size_t const i) const noexcept
Return the i-th element.
Definition interleaved_bloom_filter.hpp:758
binning_bitvector(size_t const size)
Construct with given size.
Definition interleaved_bloom_filter.hpp:693
size_t size() const noexcept
Returns the number of elements.
Definition interleaved_bloom_filter.hpp:698
binning_bitvector & operator=(binning_bitvector &&)=default
Defaulted.
auto begin() noexcept
Returns an iterator to the first element of the container.
Definition interleaved_bloom_filter.hpp:707
auto begin() const noexcept
Returns an iterator to the first element of the container.
Definition interleaved_bloom_filter.hpp:713
auto operator[](size_t const i) noexcept
Return the i-th element.
Definition interleaved_bloom_filter.hpp:751
binning_bitvector & operator=(binning_bitvector const &)=default
Defaulted.
friend bool operator==(binning_bitvector const &lhs, binning_bitvector const &rhs) noexcept
Test for equality.
Definition interleaved_bloom_filter.hpp:735
friend bool operator!=(binning_bitvector const &lhs, binning_bitvector const &rhs) noexcept
Test for inequality.
Definition interleaved_bloom_filter.hpp:741
Manages membership queries for the seqan3::interleaved_bloom_filter.
Definition interleaved_bloom_filter.hpp:584
binning_bitvector const & bulk_contains(size_t const value) &noexcept
Determines set membership of a given value.
Definition interleaved_bloom_filter.hpp:636
membership_agent_type & operator=(membership_agent_type const &)=default
Defaulted.
binning_bitvector const & bulk_contains(size_t const value) &&noexcept=delete
Determines set membership of a given value.
membership_agent_type(membership_agent_type &&)=default
Defaulted.
membership_agent_type(membership_agent_type const &)=default
Defaulted.
membership_agent_type & operator=(membership_agent_type &&)=default
Defaulted.
binning_bitvector result_buffer
Stores the result of bulk_contains().
Definition interleaved_bloom_filter.hpp:614
The IBF binning directory. A data structure that efficiently answers set-membership queries for multi...
Definition interleaved_bloom_filter.hpp:131
interleaved_bloom_filter(interleaved_bloom_filter< data_layout::uncompressed > const &ibf)
Construct a compressed Interleaved Bloom Filter.
Definition interleaved_bloom_filter.hpp:268
void emplace(size_t const value, bin_index const bin) noexcept
Inserts a value into a specific bin.
Definition interleaved_bloom_filter.hpp:293
interleaved_bloom_filter(interleaved_bloom_filter< data_layout::compressed > const &ibf)
Construct an uncompressed Interleaved Bloom Filter from a compressed one.
Definition interleaved_bloom_filter.hpp:248
interleaved_bloom_filter & operator=(interleaved_bloom_filter const &)=default
Defaulted.
membership_agent_type membership_agent() const
Returns a seqan3::interleaved_bloom_filter::membership_agent_type to be used for lookup.
Definition interleaved_bloom_filter.hpp:433
size_t hash_function_count() const noexcept
Returns the number of hash functions used in the Interleaved Bloom Filter.
Definition interleaved_bloom_filter.hpp:462
constexpr data_type const & raw_data() const noexcept
Provides direct, unsafe access to the underlying data structure.
Definition interleaved_bloom_filter.hpp:545
void clear(bin_index const bin) noexcept
Clears a specific bin.
Definition interleaved_bloom_filter.hpp:317
interleaved_bloom_filter(seqan3::bin_count bins_, seqan3::bin_size size, seqan3::hash_function_count funs=seqan3::hash_function_count{2u})
Construct an uncompressed Interleaved Bloom Filter.
Definition interleaved_bloom_filter.hpp:218
interleaved_bloom_filter()=default
Defaulted.
counting_agent_type< value_t > counting_agent() const
Returns a seqan3::interleaved_bloom_filter::counting_agent_type to be used for counting.
Definition interleaved_bloom_filter.hpp:450
constexpr data_type & raw_data() noexcept
Provides direct, unsafe access to the underlying data structure.
Definition interleaved_bloom_filter.hpp:539
interleaved_bloom_filter & operator=(interleaved_bloom_filter &&)=default
Defaulted.
friend bool operator!=(interleaved_bloom_filter const &lhs, interleaved_bloom_filter const &rhs) noexcept
Test for inequality.
Definition interleaved_bloom_filter.hpp:523
interleaved_bloom_filter(interleaved_bloom_filter &&)=default
Defaulted.
void increase_bin_number_to(bin_count const new_bins_)
Increases the number of bins stored in the Interleaved Bloom Filter.
Definition interleaved_bloom_filter.hpp:378
size_t bin_count() const noexcept
Returns the number of bins that the Interleaved Bloom Filter manages.
Definition interleaved_bloom_filter.hpp:470
void clear(rng_t &&bin_range) noexcept
Clears a range of bins.
Definition interleaved_bloom_filter.hpp:340
size_t bin_size() const noexcept
Returns the size of a single bin that the Interleaved Bloom Filter manages.
Definition interleaved_bloom_filter.hpp:478
size_t bit_size() const noexcept
Returns the size of the underlying bitvector.
Definition interleaved_bloom_filter.hpp:486
interleaved_bloom_filter(interleaved_bloom_filter const &)=default
Defaulted.
~interleaved_bloom_filter()=default
Defaulted.
friend bool operator==(interleaved_bloom_filter const &lhs, interleaved_bloom_filter const &rhs) noexcept
Test for equality.
Definition interleaved_bloom_filter.hpp:500
static constexpr data_layout data_layout_mode
Indicates whether the Interleaved Bloom Filter is compressed.
Definition interleaved_bloom_filter.hpp:188
T countl_zero(T... args)
T countr_zero(T... args)
T data(T... args)
T fill(T... args)
@ offset
Sequence (seqan3::field::seq) relative start position (0-based), unsigned value.
data_layout
Determines if the Interleaved Bloom Filter is compressed.
Definition interleaved_bloom_filter.hpp:25
@ uncompressed
The Interleaved Bloom Filter is uncompressed.
Definition interleaved_bloom_filter.hpp:26
@ compressed
The Interleaved Bloom Filter is compressed.
Definition interleaved_bloom_filter.hpp:27
T memcpy(T... args)
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
SeqAn specific customisations in the standard namespace.
Provides basic data structure for strong types.
A strong type that represents the number of bins for the seqan3::interleaved_bloom_filter.
Definition interleaved_bloom_filter.hpp:33
A strong type that represents the bin index for the seqan3::interleaved_bloom_filter.
Definition interleaved_bloom_filter.hpp:54
A strong type that represents the number of bits for each bin in the seqan3::interleaved_bloom_filter...
Definition interleaved_bloom_filter.hpp:40
A strong type that represents the number of hash functions for the seqan3::interleaved_bloom_filter.
Definition interleaved_bloom_filter.hpp:47
strong_type for seed.
Definition minimiser_hash.hpp:22
T tie(T... args)
T transform(T... args)
Hide me