Skip to content

Commit 2a09a3c

Browse files
authored
Merge pull request #3357 from eseiler/misc/deprecate
[MISC] Separate Bloom Filter strong types
2 parents d8de8c3 + 756c028 commit 2a09a3c

File tree

3 files changed

+63
-37
lines changed

3 files changed

+63
-37
lines changed

include/seqan3/search/dream_index/interleaved_bloom_filter.hpp

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,47 +14,13 @@
1414

1515
#include <seqan3/contrib/sdsl-lite.hpp>
1616
#include <seqan3/core/concept/cereal.hpp>
17-
#include <seqan3/core/detail/strong_type.hpp>
17+
//Todo: When removing, the contents of the following header can be moved into utility/bloom_filter/bloom_filter.hpp
18+
#include <seqan3/utility/bloom_filter/bloom_filter_strong_types.hpp>
1819

1920
SEQAN3_DEPRECATED_HEADER("This header and its functionality is deprecated and will be removed in a future version of SeqAn. Please use the hibf-library (url: https://github.com/seqan/hibf) instead.");
2021

2122
namespace seqan3
2223
{
23-
//!\brief Determines if the Interleaved Bloom Filter is compressed.
24-
//!\ingroup search_dream_index
25-
enum data_layout : bool
26-
{
27-
uncompressed, //!< The Interleaved Bloom Filter is uncompressed.
28-
compressed //!< The Interleaved Bloom Filter is compressed.
29-
};
30-
31-
//!\brief A strong type that represents the number of bins for the seqan3::interleaved_bloom_filter.
32-
//!\ingroup search_dream_index
33-
struct bin_count : public detail::strong_type<size_t, bin_count, detail::strong_type_skill::convert>
34-
{
35-
using detail::strong_type<size_t, bin_count, detail::strong_type_skill::convert>::strong_type;
36-
};
37-
38-
//!\brief A strong type that represents the number of bits for each bin in the seqan3::interleaved_bloom_filter.
39-
//!\ingroup search_dream_index
40-
struct bin_size : public detail::strong_type<size_t, bin_size, detail::strong_type_skill::convert>
41-
{
42-
using detail::strong_type<size_t, bin_size, detail::strong_type_skill::convert>::strong_type;
43-
};
44-
45-
//!\brief A strong type that represents the number of hash functions for the seqan3::interleaved_bloom_filter.
46-
//!\ingroup search_dream_index
47-
struct hash_function_count : public detail::strong_type<size_t, hash_function_count, detail::strong_type_skill::convert>
48-
{
49-
using detail::strong_type<size_t, hash_function_count, detail::strong_type_skill::convert>::strong_type;
50-
};
51-
52-
//!\brief A strong type that represents the bin index for the seqan3::interleaved_bloom_filter.
53-
//!\ingroup search_dream_index
54-
struct bin_index : public detail::strong_type<size_t, bin_index, detail::strong_type_skill::convert>
55-
{
56-
using detail::strong_type<size_t, bin_index, detail::strong_type_skill::convert>::strong_type;
57-
};
5824

5925
/*!\brief The IBF binning directory. A data structure that efficiently answers set-membership queries for multiple bins.
6026
* \ingroup search_dream_index

include/seqan3/utility/bloom_filter/bloom_filter.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99

1010
#pragma once
1111

12-
#include <seqan3/search/dream_index/interleaved_bloom_filter.hpp>
12+
#include <seqan3/contrib/sdsl-lite.hpp>
13+
#include <seqan3/core/concept/cereal.hpp>
14+
//Todo: When removing search/dream_index/interleaved_bloom_filter.hpp, the contents of the following header can be
15+
// moved into this file
16+
#include <seqan3/utility/bloom_filter/bloom_filter_strong_types.hpp>
1317

1418
namespace seqan3
1519
{
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
2+
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
3+
// SPDX-License-Identifier: BSD-3-Clause
4+
5+
/*!\file
6+
* \author Enrico Seiler <enrico.seiler AT fu-berlin.de>
7+
* \brief Provides strong types for the (Interleaved) Bloom Filter.
8+
*/
9+
10+
#pragma once
11+
12+
#include <seqan3/core/detail/strong_type.hpp>
13+
14+
//Todo: When removing search/dream_index/interleaved_bloom_filter.hpp, the contents of this header can be moved
15+
// into utility/bloom_filter/bloom_filter.hpp
16+
17+
namespace seqan3
18+
{
19+
20+
//!\brief Determines if the Interleaved Bloom Filter is compressed.
21+
//!\ingroup utility_bloom_filter
22+
enum data_layout : bool
23+
{
24+
uncompressed, //!< The Interleaved Bloom Filter is uncompressed.
25+
compressed //!< The Interleaved Bloom Filter is compressed.
26+
};
27+
28+
//!\brief A strong type that represents the number of bins for the seqan3::interleaved_bloom_filter.
29+
//!\ingroup utility_bloom_filter
30+
struct bin_count : public detail::strong_type<size_t, bin_count, detail::strong_type_skill::convert>
31+
{
32+
using detail::strong_type<size_t, bin_count, detail::strong_type_skill::convert>::strong_type;
33+
};
34+
35+
//!\brief A strong type that represents the number of bits for each bin in the seqan3::interleaved_bloom_filter.
36+
//!\ingroup utility_bloom_filter
37+
struct bin_size : public detail::strong_type<size_t, bin_size, detail::strong_type_skill::convert>
38+
{
39+
using detail::strong_type<size_t, bin_size, detail::strong_type_skill::convert>::strong_type;
40+
};
41+
42+
//!\brief A strong type that represents the number of hash functions for the seqan3::interleaved_bloom_filter.
43+
//!\ingroup utility_bloom_filter
44+
struct hash_function_count : public detail::strong_type<size_t, hash_function_count, detail::strong_type_skill::convert>
45+
{
46+
using detail::strong_type<size_t, hash_function_count, detail::strong_type_skill::convert>::strong_type;
47+
};
48+
49+
//!\brief A strong type that represents the bin index for the seqan3::interleaved_bloom_filter.
50+
//!\ingroup utility_bloom_filter
51+
struct bin_index : public detail::strong_type<size_t, bin_index, detail::strong_type_skill::convert>
52+
{
53+
using detail::strong_type<size_t, bin_index, detail::strong_type_skill::convert>::strong_type;
54+
};
55+
56+
} // namespace seqan3

0 commit comments

Comments
 (0)