72template <
typename derived_t, matrix_major_order order>
80 template <
typename other_derived_t, matrix_major_order other_order>
101 template <
typename _derived_t>
105 template <
typename _derived_t>
109 template <
typename _derived_t>
117 template <
typename dummy_t = derived_t>
124 template <
typename dummy_t = derived_t>
131 template <
typename dummy_t = derived_t>
138 template <
typename dummy_t = derived_t>
154 SEQAN3_DOXYGEN_ONLY(
constexpr seqan3::detail::matrix_coordinate
coordinate()
const noexcept {})
195 template <
typename dummy_t = derived_t>
205 template <
typename dummy_t = derived_t>
214 template <
typename dummy_t = derived_t>
252 template <
typename dummy_t = derived_t>
259 template <
typename dummy_t = derived_t>
282 template <
typename dummy_t = derived_t>
285 return lhs.as_host_iter() - rhs.as_host_iter();
295 template <
typename other_derived_t>
296 requires std::constructible_from<derived_t, other_derived_t>
297 || std::constructible_from<other_derived_t, derived_t>
300 return as_derived().host_iter == rhs.as_derived().host_iter;
304 template <
typename other_derived_t>
305 requires std::constructible_from<derived_t, other_derived_t>
306 || std::constructible_from<other_derived_t, derived_t>
309 return !(*
this == rhs);
313 template <
typename other_derived_t>
314 requires std::constructible_from<derived_t, other_derived_t>
315 || std::constructible_from<other_derived_t, derived_t>
318 return as_derived().host_iter < rhs.as_derived().host_iter;
322 template <
typename other_derived_t>
323 requires std::constructible_from<derived_t, other_derived_t>
324 || std::constructible_from<other_derived_t, derived_t>
327 return as_derived().host_iter <= rhs.as_derived().host_iter;
331 template <
typename other_derived_t>
332 requires std::constructible_from<derived_t, other_derived_t>
333 || std::constructible_from<other_derived_t, derived_t>
336 return as_derived().host_iter > rhs.as_derived().host_iter;
340 template <
typename other_derived_t>
341 requires std::constructible_from<derived_t, other_derived_t>
342 || std::constructible_from<other_derived_t, derived_t>
345 return as_derived().host_iter >= rhs.as_derived().host_iter;
365 return static_cast<derived_t const &
>(*this);
Provides various type traits on generic types.
A crtp-base class for iterators over seqan3::detail::two_dimensional_matrix.
Definition two_dimensional_matrix_iterator_base.hpp:74
constexpr derived_t operator--(int) noexcept
Returns an iterator decremented by one following the given matrix major order.
Definition two_dimensional_matrix_iterator_base.hpp:244
constexpr bool operator>=(two_dimensional_matrix_iterator_base< other_derived_t, order > const &rhs) const noexcept
Checks if lhs is greater than or equal to rhs.
Definition two_dimensional_matrix_iterator_base.hpp:343
constexpr derived_t & operator-=(std::iter_difference_t< dummy_t > const offset) noexcept
Advances the iterator by offset following the given matrix major order.
Definition two_dimensional_matrix_iterator_base.hpp:253
constexpr friend derived_t operator+(std::iter_difference_t< dummy_t > const offset, derived_t const iter)
Returns an iterator advanced by offset following the given matrix major order.
Definition two_dimensional_matrix_iterator_base.hpp:215
typename _derived_t::pointer pointer
Helper template definition to get the pointer type of the derived type.
Definition two_dimensional_matrix_iterator_base.hpp:110
constexpr friend derived_t operator+(matrix_offset const &offset, derived_t const iter)
Returns an iterator advanced by offset in the respective dimensions.
Definition two_dimensional_matrix_iterator_base.hpp:229
constexpr two_dimensional_matrix_iterator_base()=default
Defaulted.
friend derived_t
Befriend the derived type.
Definition two_dimensional_matrix_iterator_base.hpp:77
constexpr two_dimensional_matrix_iterator_base & operator=(two_dimensional_matrix_iterator_base &&)=default
Defaulted.
constexpr derived_t & operator-=(matrix_offset const &offset) noexcept
Returns an iterator advanced by offset in the respective dimensions.
Definition two_dimensional_matrix_iterator_base.hpp:268
constexpr reference< dummy_t > operator[](std::iter_difference_t< dummy_t > const offset) const noexcept
Returns a reference to the pointed-to-element after advancing the iterator by the given offset.
Definition two_dimensional_matrix_iterator_base.hpp:125
constexpr auto const & as_host_iter() const
Return the host_iter of the derived type.
Definition two_dimensional_matrix_iterator_base.hpp:351
constexpr derived_t & operator--() noexcept
Advances the iterator by minus one following the given matrix major order.
Definition two_dimensional_matrix_iterator_base.hpp:235
constexpr derived_t operator++(int) noexcept
Returns an iterator incremented by one following the given matrix major order.
Definition two_dimensional_matrix_iterator_base.hpp:187
constexpr derived_t & operator+=(std::iter_difference_t< dummy_t > const offset) noexcept
Advances the iterator by offset following the given matrix major order.
Definition two_dimensional_matrix_iterator_base.hpp:196
constexpr two_dimensional_matrix_iterator_base & operator=(two_dimensional_matrix_iterator_base const &)=default
Defaulted.
constexpr two_dimensional_matrix_iterator_base(two_dimensional_matrix_iterator_base const &)=default
Defaulted.
friend constexpr std::iter_difference_t< dummy_t > operator-(derived_t const lhs, derived_t const rhs) noexcept
Returns the distance between two iterators.
Definition two_dimensional_matrix_iterator_base.hpp:283
constexpr bool operator==(two_dimensional_matrix_iterator_base< other_derived_t, order > const &rhs) const noexcept
Returns true if both iterators are equal, false otherwise.
Definition two_dimensional_matrix_iterator_base.hpp:298
constexpr pointer< dummy_t > operator->() const noexcept
Returns a pointer to the pointed-to-element.
Definition two_dimensional_matrix_iterator_base.hpp:139
constexpr derived_t operator-(matrix_offset const &offset) const noexcept
Returns an iterator advanced by offset in the respective dimensions.
Definition two_dimensional_matrix_iterator_base.hpp:274
constexpr derived_t operator+(std::iter_difference_t< dummy_t > const offset) const noexcept
Returns an iterator advanced by offset following the given matrix major order.
Definition two_dimensional_matrix_iterator_base.hpp:206
constexpr bool operator<=(two_dimensional_matrix_iterator_base< other_derived_t, order > const &rhs) const noexcept
Checks if lhs is smaller than or equal to rhs.
Definition two_dimensional_matrix_iterator_base.hpp:325
constexpr reference< dummy_t > operator[](matrix_offset const &offset) const noexcept
Returns a reference to the pointed-to-element after advancing the iterator by the given offset.
Definition two_dimensional_matrix_iterator_base.hpp:132
constexpr reference< dummy_t > operator*() const noexcept
Returns a reference to the pointed to element.
Definition two_dimensional_matrix_iterator_base.hpp:118
typename _derived_t::reference reference
Helper template definition to get the reference type of the derived type.
Definition two_dimensional_matrix_iterator_base.hpp:106
constexpr derived_t const & as_derived() const
Cast this to derived type.
Definition two_dimensional_matrix_iterator_base.hpp:363
constexpr bool operator>(two_dimensional_matrix_iterator_base< other_derived_t, order > const &rhs) const noexcept
Checks if lhs is greater than rhs.
Definition two_dimensional_matrix_iterator_base.hpp:334
constexpr two_dimensional_matrix_iterator_base(two_dimensional_matrix_iterator_base &&)=default
Defaulted.
constexpr seqan3::detail::matrix_coordinate coordinate() const noexcept
Returns the current position of the iterator as a seqan3::detail::matrix_coordinate.
Definition two_dimensional_matrix_iterator_base.hpp:154
constexpr bool operator<(two_dimensional_matrix_iterator_base< other_derived_t, order > const &rhs) const noexcept
Checks if lhs is smaller than rhs.
Definition two_dimensional_matrix_iterator_base.hpp:316
constexpr derived_t operator+(matrix_offset const &offset) const noexcept
Returns an iterator advanced by offset in the respective dimensions.
Definition two_dimensional_matrix_iterator_base.hpp:221
constexpr derived_t & as_derived()
Cast this to derived type.
Definition two_dimensional_matrix_iterator_base.hpp:357
constexpr bool operator!=(two_dimensional_matrix_iterator_base< other_derived_t, order > const &rhs) const noexcept
Returns true if both iterators are unequal, false otherwise.
Definition two_dimensional_matrix_iterator_base.hpp:307
constexpr derived_t operator-(std::iter_difference_t< dummy_t > const offset) const noexcept
Returns an iterator advanced by offset following the given matrix major order.
Definition two_dimensional_matrix_iterator_base.hpp:260
typename _derived_t::difference_type difference_type
Helper template definition to get the difference type of the derived type.
Definition two_dimensional_matrix_iterator_base.hpp:102
~two_dimensional_matrix_iterator_base()=default
Defaulted.
matrix_major_order
Selects the major order of the matrix.
Definition two_dimensional_matrix_iterator_base.hpp:36
@ column
The corresponding alignment coordinate will be incrementable/decrementable in the column index.
@ row
The corresponding alignment coordinate will be incrementable/decrementable in the row index.
@ column
Accesses matrix in column major order.
@ offset
Sequence (seqan3::field::seq) relative start position (0-based), unsigned value.
Provides various transformation traits for use on iterators.
Provides seqan3::detail::matrix_index, seqan3::detail::matrix_coordinate and associated strong types.
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
A strong type for designated initialisation of the column index of a matrix.
Definition matrix_coordinate.hpp:29
A representation of a location or offset within a two-dimensional matrix.
Definition matrix_coordinate.hpp:87
A strong type for designated initialisation of the row index of a matrix.
Definition matrix_coordinate.hpp:58