SeqAn3  3.0.3
The Modern C++ library for sequence analysis.
static_band.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
15 #pragma once
16 
17 #include <limits>
18 #include <stdexcept>
19 
21 #include <seqan3/std/concepts>
22 
23 namespace seqan3
24 {
25 
31 {
32 public:
33  constexpr static_band() noexcept = default;
34  constexpr static_band(static_band const &) noexcept = default;
35  constexpr static_band(static_band &&) noexcept = default;
36  constexpr static_band & operator=(static_band const &) noexcept = default;
37  constexpr static_band & operator=(static_band &&) noexcept = default;
38  ~static_band() noexcept = default;
39 
49  template <std::integral input_value_t>
50  constexpr static_band(lower_bound<input_value_t> const lower, upper_bound<input_value_t> const upper)
51  : lower_bound{lower.get()}, upper_bound{upper.get()}
52  {
53  if (lower.get() > upper.get())
54  {
55  throw std::invalid_argument("The upper boundary must not be smaller than the lower boundary.");
56  }
57  }
58 
60  int64_t lower_bound{std::numeric_limits<int64_t>::lowest()};
62  int64_t upper_bound{std::numeric_limits<int64_t>::max()};
63 };
64 
65 } // namespace seqan3
[DEPRECATED] Provides seqan3::lower_bound and seqan3::upper_bound.
[DEPRECATED] Data structure for a static band.
Definition: static_band.hpp:31
constexpr static_band() noexcept=default
Defaulted.
The Concepts library.
T lowest(T... args)
T max(T... args)
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
SeqAn specific customisations in the standard namespace.
#define SEQAN3_DEPRECATED_310
Deprecation message for SeqAn 3.1.0 release.
Definition: platform.hpp:203