Skip to content

Commit 3436759

Browse files
committed
[MISC] Separate Bloom Filter strong types
Such that including the bloom_filter does not trigger deprecation warnings
1 parent d8de8c3 commit 3436759

File tree

3 files changed

+69
-37
lines changed

3 files changed

+69
-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: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
// Also remove \ingroup search_dream_index when doing this
17+
18+
namespace seqan3
19+
{
20+
21+
//!\brief Determines if the Interleaved Bloom Filter is compressed.
22+
//!\ingroup search_dream_index
23+
//!\ingroup utility_bloom_filter
24+
enum data_layout : bool
25+
{
26+
uncompressed, //!< The Interleaved Bloom Filter is uncompressed.
27+
compressed //!< The Interleaved Bloom Filter is compressed.
28+
};
29+
30+
//!\brief A strong type that represents the number of bins for the seqan3::interleaved_bloom_filter.
31+
//!\ingroup search_dream_index
32+
//!\ingroup utility_bloom_filter
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+
//!\ingroup utility_bloom_filter
41+
struct bin_size : public detail::strong_type<size_t, bin_size, detail::strong_type_skill::convert>
42+
{
43+
using detail::strong_type<size_t, bin_size, detail::strong_type_skill::convert>::strong_type;
44+
};
45+
46+
//!\brief A strong type that represents the number of hash functions for the seqan3::interleaved_bloom_filter.
47+
//!\ingroup search_dream_index
48+
//!\ingroup utility_bloom_filter
49+
struct hash_function_count : public detail::strong_type<size_t, hash_function_count, detail::strong_type_skill::convert>
50+
{
51+
using detail::strong_type<size_t, hash_function_count, detail::strong_type_skill::convert>::strong_type;
52+
};
53+
54+
//!\brief A strong type that represents the bin index for the seqan3::interleaved_bloom_filter.
55+
//!\ingroup search_dream_index
56+
//!\ingroup utility_bloom_filter
57+
struct bin_index : public detail::strong_type<size_t, bin_index, detail::strong_type_skill::convert>
58+
{
59+
using detail::strong_type<size_t, bin_index, detail::strong_type_skill::convert>::strong_type;
60+
};
61+
62+
} // namespace seqan3

0 commit comments

Comments
 (0)