SeqAn3  3.0.1
The Modern C++ library for sequence analysis.
seqan3::alignment_range< alignment_executor_type > Class Template Reference

An input range over the alignment results generated by the underlying alignment executor. More...

#include <seqan3/alignment/pairwise/alignment_range.hpp>

+ Inheritance diagram for seqan3::alignment_range< alignment_executor_type >:

Classes

class  alignment_range_iterator
 The iterator of seqan3::detail::alignment_range. More...
 

Public Types

using const_iterator = void
 This range is never const-iterable. The const_iterator is always void.
 
using difference_type = typename alignment_executor_type::difference_type
 The offset type.
 
using iterator = alignment_range_iterator
 The iterator type.
 
using reference = typename alignment_executor_type::reference
 The reference type.
 
using sentinel = std::ranges::default_sentinel_t
 The sentinel type.
 
using value_type = typename alignment_executor_type::value_type
 The alignment result type.
 

Public Member Functions

Constructors, destructor and assignment
 alignment_range ()=default
 Defaulted.
 
 alignment_range (alignment_range const &)=delete
 This is a move-only type.
 
 alignment_range (alignment_range &&)=default
 Defaulted.
 
alignment_rangeoperator= (alignment_range const &)=delete
 This is a move-only type.
 
alignment_rangeoperator= (alignment_range &&)=default
 Defaulted.
 
 ~alignment_range ()=default
 Defaulted.
 
 alignment_range (alignment_executor_type const &_alignment_executor)=delete
 Explicit deletion to forbid copy construction of the underlying executor.
 
 alignment_range (alignment_executor_type &&_alignment_executor)
 Constructs a new alignment range by taking ownership over the passed alignment buffer. More...
 
Iterators
constexpr iterator begin ()
 Returns an iterator to the first element of the alignment range. More...
 
const_iterator begin () const =delete
 
const_iterator cbegin () const =delete
 
constexpr sentinel end () noexcept
 Returns a sentinel signaling the end of the alignment range. More...
 
constexpr sentinel end () const =delete
 
constexpr sentinel cend () const =delete
 

Protected Member Functions

bool next ()
 Receives the next alignment result from the executor buffer. More...
 

Friends

class alignment_range_iterator
 Befriend the iterator type.
 

Related Functions

(Note that these are not member functions.)

Type deduction guide
template<typename alignment_executor_type >
 alignment_range (alignment_executor_type &&) -> alignment_range< std::remove_reference_t< alignment_executor_type >>
 Deduces from the passed alignment_executor_type.
 

Detailed Description

template<typename alignment_executor_type>
class seqan3::alignment_range< alignment_executor_type >

An input range over the alignment results generated by the underlying alignment executor.

Template Parameters
alignment_executor_typeThe type of the underlying alignment executor; must be of type seqan3::detail::alignment_executor_two_way.

Provides a lazy input-range interface over the alignment results generated by the underlying alignment executor. The alignments are computed in a lazy fashion, such that when incrementing the next alignment result is fetched from the executor. The alignment result will be cached such that dereferencing the associated iterator is constant.

Constructor & Destructor Documentation

◆ alignment_range()

template<typename alignment_executor_type >
seqan3::alignment_range< alignment_executor_type >::alignment_range ( alignment_executor_type &&  _alignment_executor)
inlineexplicit

Constructs a new alignment range by taking ownership over the passed alignment buffer.

Template Parameters
_alignment_executor_typeThe buffer type. Must be the same type as alignment_executor_type when references and cv-qualifiers are removed.
Parameters
[in]_alignment_executorThe buffer to take ownership from.

Constructs a new alignment range by taking ownership over the passed alignment buffer.

Member Function Documentation

◆ begin()

template<typename alignment_executor_type >
constexpr iterator seqan3::alignment_range< alignment_executor_type >::begin ( )
inlineconstexpr

Returns an iterator to the first element of the alignment range.

Returns
An iterator to the first element.

Invocation of this function will trigger the computation of the first alignment.

◆ end()

template<typename alignment_executor_type >
constexpr sentinel seqan3::alignment_range< alignment_executor_type >::end ( )
inlineconstexprnoexcept

Returns a sentinel signaling the end of the alignment range.

Returns
a sentinel.

The alignment range is an input range and the end is reached when the internal buffer over the alignment results has signaled end-of-stream.

◆ next()

template<typename alignment_executor_type >
bool seqan3::alignment_range< alignment_executor_type >::next ( )
inlineprotected

Receives the next alignment result from the executor buffer.

Returns
true if a new alignment result could be fetched, otherwise false.

Fetches the next element from the underlying alignment executor if available.


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