SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::coordinate_matrix< index_t > Class Template Reference

A matrix over coordinates. More...

#include <seqan3/alignment/matrix/detail/coordinate_matrix.hpp>

+ Inheritance diagram for seqan3::detail::coordinate_matrix< index_t >:

Classes

struct  convert_to_matrix_coordinate
 A function object that converts a column index and a row index to a seqan3::detail::matrix_coordinate. More...
 
class  iterator
 The iterator for the seqan3::detail::coordinate_matrix. More...
 

Public Member Functions

Constructors, destructor and assignment
 coordinate_matrix ()=default
 Defaulted.
 
 coordinate_matrix (coordinate_matrix const &)=default
 Defaulted.
 
 coordinate_matrix (coordinate_matrix &&)=default
 Defaulted.
 
coordinate_matrixoperator= (coordinate_matrix const &)=default
 Defaulted.
 
coordinate_matrixoperator= (coordinate_matrix &&)=default
 Defaulted.
 
 ~coordinate_matrix ()=default
 Defaulted.
 
template<std::integral column_index_t, std::integral row_index_t>
void resize (column_index_type< column_index_t > const column_count, row_index_type< row_index_t > const row_count) noexcept
 Resets the coordinate matrix with the given end column index and end row index representing the new dimensions of the matrix.
 
Iterators
iterator begin () const noexcept
 Returns the iterator pointing to the first column of the matrix.
 
iterator end () const noexcept
 Returns the iterator pointing to the end column of the matrix.
 

Private Types

template<typename simd_index_t >
using lazy_scalar_type_t = typename simd_traits< simd_index_t >::scalar_type
 Type alias for the scalar type defined by the seqan3::simd::simd_traits type.
 
using size_type = lazy_conditional_t< simd_concept< index_t >, lazy< lazy_scalar_type_t, index_t >, index_t >
 The internal size type which depends on index_t being a simd vector or a scalar type.
 

Private Attributes

size_type column_count {}
 The number of columns (corresponds to the size of one row).
 
size_type row_count {}
 The number od rows (corresponds to the size of one column).
 

Detailed Description

template<typename index_t>
requires (std::integral<index_t> || simd_index<index_t>)
class seqan3::detail::coordinate_matrix< index_t >

A matrix over coordinates.

Template Parameters
index_tThe underlying matrix index type; must mode std::integral or seqan3::simd::simd_index.

This matrix emulates a two-dimensional index, such that each cell inside of the alignment matrix can be located through a unique coordinate (=index). In the alignment algorithm this matrix is paired with the alignment matrix to form an indexed alignment matrix.

This matrix is cheap as it stores only the dimensions of the matrix and does not allocate any memory for the coordinates. It uses the seqan3::detail::matrix_coordinate_iterator to iterate over the columns of this virtual matrix. When the seqan3::detail::coordinate_matrix::matrix_coordinate_iterator is dereferenced it returns an on-the-fly constructed range (prvalue) representing the current indexed column. The reference type of this range is seqan3::detail::matrix_coordinate.

Simd mode

If the index_t is a simd vector the matrix implements a vectorised coordinate matrix instead. In this case the matrix uses a seqan3::detail::coordinate_matrix::matrix_coordinate_simd_iterator to iterate over the vectorised matrix. When the seqan3::detail::coordinate_matrix::matrix_coordinate_iterator is dereferenced it returns an on-the-fly constructed range (prvalue) representing the current simd coordinate column. The reference type of this range is seqan3::detail::simd_matrix_coordinate.

Member Function Documentation

◆ resize()

template<typename index_t >
template<std::integral column_index_t, std::integral row_index_t>
void seqan3::detail::coordinate_matrix< index_t >::resize ( column_index_type< column_index_t > const  column_count,
row_index_type< row_index_t > const  row_count 
)
inlinenoexcept

Resets the coordinate matrix with the given end column index and end row index representing the new dimensions of the matrix.

Template Parameters
column_index_tThe size type for the column count; must model std:integral.
row_index_tThe size type for the row count; must model std:integral.
Parameters
[in]column_countThe number of columns (corresponds to the size of one row).
[in]row_countThe number od rows (corresponds to the size of one column).

Complexity

Constant

Exception

noexcept


The documentation for this class was generated from the following file:
Hide me