SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
Implements an internal alignment coordinate that can be used as an argument to the std::ranges::iota_view. More...
#include <seqan3/alignment/matrix/detail/advanceable_alignment_coordinate.hpp>
Public Types | |
Member types | |
using | difference_type = std::make_signed_t< size_t > |
Defines the difference type to model the std::weakly_incrementable concept. | |
Public Member Functions | |
Constructors, destructor and assignment | |
constexpr | advanceable_alignment_coordinate () noexcept=default |
constexpr | advanceable_alignment_coordinate (advanceable_alignment_coordinate const &) noexcept=default |
Defaulted. | |
constexpr | advanceable_alignment_coordinate (advanceable_alignment_coordinate &&) noexcept=default |
constexpr advanceable_alignment_coordinate & | operator= (advanceable_alignment_coordinate const &) noexcept=default |
Defaulted. | |
constexpr advanceable_alignment_coordinate & | operator= (advanceable_alignment_coordinate &&) noexcept=default |
Defaulted. | |
~advanceable_alignment_coordinate () noexcept=default | |
Defaulted. | |
template<advanceable_alignment_coordinate_state other_state> requires (other_state != state) | |
constexpr | advanceable_alignment_coordinate (advanceable_alignment_coordinate< other_state > const &other) |
Copy-constructs from another advanceable_alignment_coordinate with a different policy. | |
template<advanceable_alignment_coordinate_state other_state> requires (other_state != state) | |
constexpr | advanceable_alignment_coordinate (advanceable_alignment_coordinate< other_state > &&other) |
Move-constructs from another advanceable_alignment_coordinate with a different policy. | |
constexpr | advanceable_alignment_coordinate (column_index_type< size_t > const c_idx, row_index_type< size_t > const r_idx) noexcept |
Construction from the respective column and row indices. | |
Member functions | |
Advances or decrements the respective column or row coordinate depending on the set policy. These member functions are not available if the non-type template parameter | |
constexpr advanceable_alignment_coordinate & | operator++ () noexcept |
Increments the coordinate depending on the set policy by one. | |
constexpr advanceable_alignment_coordinate | operator++ (int) noexcept |
Post-increments the coordinate depending on the set policy by one. | |
constexpr advanceable_alignment_coordinate & | operator-- () noexcept |
Decrements the coordinate depending on the set policy by one. | |
constexpr advanceable_alignment_coordinate | operator-- (int) noexcept |
Post-decrements the coordinate depending on the set policy by one. | |
constexpr advanceable_alignment_coordinate & | operator+= (difference_type const offset) noexcept |
Returns the coordinate which is advanced depending on the set policy by offset . | |
constexpr advanceable_alignment_coordinate & | operator-= (difference_type const offset) noexcept |
Returns the coordinate which is advanced depending on the set policy by -offset . | |
constexpr advanceable_alignment_coordinate | operator+ (difference_type const offset) const noexcept |
Returns a new coordinate which is advanced depending on the set policy by offset . | |
constexpr advanceable_alignment_coordinate | operator- (difference_type const offset) const noexcept |
Returns a new coordinate which is advanced depending on the set policy by -offset . | |
constexpr difference_type | operator- (advanceable_alignment_coordinate const &other) const noexcept |
Returns the difference of this and another coordinate depending on the set policy. | |
Public Attributes | |
size_t | first {} |
The front/back position of the alignment in the first sequence. | |
size_t | second {} |
The front/back position of the alignment in the second sequence. | |
Friends | |
constexpr friend advanceable_alignment_coordinate | operator+ (difference_type const offset, advanceable_alignment_coordinate const &me) noexcept |
Non-member function. | |
Implements an internal alignment coordinate that can be used as an argument to the std::ranges::iota_view.
states | A non-type template flag to enable a specific advanceable policy. |
This class provides all members to make the advanceable_alignment_coordinate
be usable in a std::ranges::iota_view. For the purpose of alignments, modelling only incrementable and decrementable would fully suffice. Unfortunately, the current range implementation does not preserve std::ranges::bidirectional_range properties, so we need to model the full advanceable concept in order to preserve the std::ranges::random_access_range properties. This, however, can be relaxed if the range implementation fully complies with the current standard draft for Ranges, as increment and decrement would be enough and std::views::iota would preserve std::ranges::bidirectional_range.
|
constexprdefaultnoexcept |
Defaulted
|
constexprdefaultnoexcept |
Defaulted
|
inlineconstexprnoexcept |
Construction from the respective column and row indices.
c_idx | The respective column index within the matrix. Of type seqan3::detail::column_index_type. |
r_idx | The respective row index within the matrix. Of type seqan3::detail::row_index_type. |
|
inlineconstexprnoexcept |
Returns a new coordinate which is advanced depending on the set policy by offset
.
offset | The value to add to the coordinate. |
|
inlineconstexprnoexcept |
Increments the coordinate depending on the set policy by one.
*this
|
inlineconstexprnoexcept |
Post-increments the coordinate depending on the set policy by one.
|
inlineconstexprnoexcept |
Returns the coordinate which is advanced depending on the set policy by offset
.
offset | The value to add to the coordinate. |
*this
|
inlineconstexprnoexcept |
Returns the difference of this and another coordinate depending on the set policy.
other | The other coordinate. |
|
inlineconstexprnoexcept |
Returns a new coordinate which is advanced depending on the set policy by -offset
.
offset | The value to subtract from the coordinate. |
|
inlineconstexprnoexcept |
Decrements the coordinate depending on the set policy by one.
*this
|
inlineconstexprnoexcept |
Post-decrements the coordinate depending on the set policy by one.
|
inlineconstexprnoexcept |
Returns the coordinate which is advanced depending on the set policy by -offset
.
offset | The value to subtract from the coordinate. |
*this
|
friend |
Non-member function.
Advances the respective coordinate depending on the set policy by the given offset. This function is not available if the policy was set to seqan3::detail::advanceable_alignment_coordinate_state::none.