SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors > Class Template Reference

The underlying data structure of seqan3::detail::edit_distance_unbanded that represents the trace matrix. More...

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

Classes

struct  column_type
 The state of one computation step. More...
 
struct  max_errors_state
 If use_max_errors is true store these additional state information in state_type. More...
 
struct  trace_matrix_state
 This information is needed to infer the trace matrix. More...
 
struct  trace_path_iterator
 The iterator needed to implement seqan3::detail::edit_distance_trace_matrix_full::trace_path. More...
 

Public Types

using reference = value_type
 The type of a reference to an entry in the matrix.
 
using size_type = size_t
 The size type of the matrix.
 
using value_type = detail::trace_directions
 The type of an entry in the matrix.
 
using word_type = word_t
 The type of one machine word.
 

Public Member Functions

reference at (matrix_coordinate const &coordinate) const noexcept
 A reference to the entry of the matrix at the given coordinate.
 
size_t cols () const noexcept
 The number of columns in the matrix.
 
void reserve (size_t const new_capacity)
 Increase the capacity of the columns to a value that's greater or equal to new_capacity.
 
size_t rows () const noexcept
 The number of rows in the matrix.
 
auto trace_path (matrix_coordinate const &trace_begin) const
 Returns a trace path starting from the given coordinate and ending in the cell with seqan3::detail::trace_directions::none.
 

Static Public Attributes

static constexpr auto word_size = bits_of<word_type>
 The size of one machine word.
 

Protected Member Functions

void add_column (std::vector< word_type > left, std::vector< word_type > diagonal, std::vector< word_type > up)
 Adds a column to the trace matrix.
 
void add_column (std::vector< word_type > left, std::vector< word_type > diagonal, std::vector< word_type > up, size_t const max_rows)
 Adds a column to the trace matrix.
 

Private Attributes

std::vector< column_typecolumns {}
 The columns of the trace matrix.
 
size_t rows_size {}
 The number of rows in the matrix.
 

Friends

template<std::ranges::viewable_range database_t, std::ranges::viewable_range query_t, typename align_config_t , typename edit_traits >
class edit_distance_unbanded
 This friend allows the edit distance algorithm to fill the trace matrix via add_column.
 

Constructors, destructor and assignment

template<typename derived_t , typename edit_traits >
class edit_distance_unbanded_trace_matrix_policy
 Allow seqan3::detail::edit_distance_unbanded_trace_matrix_policy to access the private constructor.
 
 edit_distance_trace_matrix_full ()=default
 Defaulted.
 
 edit_distance_trace_matrix_full (edit_distance_trace_matrix_full const &)=default
 Defaulted.
 
 edit_distance_trace_matrix_full (edit_distance_trace_matrix_full &&)=default
 Defaulted.
 
edit_distance_trace_matrix_fulloperator= (edit_distance_trace_matrix_full const &)=default
 Defaulted.
 
edit_distance_trace_matrix_fulloperator= (edit_distance_trace_matrix_full &&)=default
 Defaulted.
 
 ~edit_distance_trace_matrix_full ()=default
 Defaulted.
 
 edit_distance_trace_matrix_full (size_t const rows_size)
 Construct the score_matrix by giving the number of rows within the matrix.
 

Detailed Description

template<typename word_t, bool is_semi_global, bool use_max_errors>
class seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >

The underlying data structure of seqan3::detail::edit_distance_unbanded that represents the trace matrix.

Template Parameters
word_tThe type of one machine word.
is_semi_globalWhether the alignment is a semi-global alignment or not.
use_max_errorsWhen true the computation will use the ukkonen trick with the last active cell and bounds the error to config.max_errors.

Member Typedef Documentation

◆ reference

template<typename word_t , bool is_semi_global, bool use_max_errors>
using seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::reference = value_type

The type of a reference to an entry in the matrix.

◆ size_type

template<typename word_t , bool is_semi_global, bool use_max_errors>
using seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::size_type = size_t

The size type of the matrix.

◆ value_type

template<typename word_t , bool is_semi_global, bool use_max_errors>
using seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::value_type = detail::trace_directions

The type of an entry in the matrix.

◆ word_type

template<typename word_t , bool is_semi_global, bool use_max_errors>
using seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::word_type = word_t

The type of one machine word.

Constructor & Destructor Documentation

◆ edit_distance_trace_matrix_full()

template<typename word_t , bool is_semi_global, bool use_max_errors>
seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::edit_distance_trace_matrix_full ( size_t const  rows_size)
inlineprotected

Construct the score_matrix by giving the number of rows within the matrix.

Parameters
rows_sizeThe number of rows in the matrix.

Member Function Documentation

◆ add_column() [1/2]

template<typename word_t , bool is_semi_global, bool use_max_errors>
void seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::add_column ( std::vector< word_type left,
std::vector< word_type diagonal,
std::vector< word_type up 
)
inlineprotected

Adds a column to the trace matrix.

Parameters
leftMachine words which represent the trace_direction::left.
diagonalMachine words which represent the trace_direction::diagonal.
upMachine words which represent the trace_direction::up.

◆ add_column() [2/2]

template<typename word_t , bool is_semi_global, bool use_max_errors>
void seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::add_column ( std::vector< word_type left,
std::vector< word_type diagonal,
std::vector< word_type up,
size_t const  max_rows 
)
inlineprotected

Adds a column to the trace matrix.

Parameters
leftMachine words which represent the trace_direction::left.
diagonalMachine words which represent the trace_direction::diagonal.
upMachine words which represent the trace_direction::up.
max_rowsThe number of max_rows within the current column. Computed by seqan3::detail::edit_distance_score_matrix_full::max_rows.

◆ at()

template<typename word_t , bool is_semi_global, bool use_max_errors>
reference seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::at ( matrix_coordinate const &  coordinate) const
inlinenoexcept

A reference to the entry of the matrix at the given coordinate.

◆ cols()

template<typename word_t , bool is_semi_global, bool use_max_errors>
size_t seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::cols ( ) const
inlinenoexcept

The number of columns in the matrix.

◆ reserve()

template<typename word_t , bool is_semi_global, bool use_max_errors>
void seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::reserve ( size_t const  new_capacity)
inline

Increase the capacity of the columns to a value that's greater or equal to new_capacity.

Parameters
new_capacityThe new capacity.

Exception

Strong exception guarantee.

◆ rows()

template<typename word_t , bool is_semi_global, bool use_max_errors>
size_t seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::rows ( ) const
inlinenoexcept

The number of rows in the matrix.

◆ trace_path()

template<typename word_t , bool is_semi_global, bool use_max_errors>
auto seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::trace_path ( matrix_coordinate const &  trace_begin) const
inline

Returns a trace path starting from the given coordinate and ending in the cell with seqan3::detail::trace_directions::none.

Parameters
[in]trace_beginA seqan3::matrix_coordinate pointing to the begin of the trace to follow.
Returns
A std::ranges::subrange over the corresponding trace path.
Exceptions
std::invalid_argumentif the specified coordinate is out of range.

Member Data Documentation

◆ rows_size

template<typename word_t , bool is_semi_global, bool use_max_errors>
size_t seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::rows_size {}
private

The number of rows in the matrix.

◆ word_size

template<typename word_t , bool is_semi_global, bool use_max_errors>
constexpr auto seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::word_size = bits_of<word_type>
staticconstexpr

The size of one machine word.


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