SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
seqan3::search_result< query_id_type, cursor_type, reference_id_type, reference_begin_position_type > Class Template Reference

The result class generated by the seqan3::seach algorithm. More...

#include <seqan3/search/search_result.hpp>

Public Member Functions

Constructors, destructor and assignment
 search_result ()=default
 Defaulted.
 
 search_result (search_result const &)=default
 Defaulted.
 
 search_result (search_result &&)=default
 Defaulted.
 
search_resultoperator= (search_result const &)=default
 Defaulted.
 
search_resultoperator= (search_result &&)=default
 Defaulted.
 
 ~search_result ()=default
 
Accessors

Functions to access elements of the search result.

constexpr auto query_id () const noexcept
 Returns the id of the query which produced this search result.
 
constexpr auto index_cursor () const noexcept(!(std::same_as< cursor_type, detail::empty_type >))
 Returns the index cursor pointing to the suffix array range where the query was found. More...
 
constexpr auto reference_id () const noexcept(!(std::same_as< reference_id_type, detail::empty_type >))
 Returns the reference id where the query was found. More...
 
constexpr auto reference_begin_position () const noexcept(!(std::same_as< reference_begin_position_type, detail::empty_type >))
 Returns the reference begin positions where the query was found in the reference text (at reference id).
 

Friends

Comparison
bool operator== (search_result const &lhs, search_result const &rhs) noexcept
 Returns whether lhs and rhs are the same.
 
bool operator!= (search_result const &lhs, search_result const &rhs) noexcept
 Returns whether lhs and rhs are not the same.
 

Detailed Description

template<typename query_id_type, typename cursor_type, typename reference_id_type, typename reference_begin_position_type>
class seqan3::search_result< query_id_type, cursor_type, reference_id_type, reference_begin_position_type >

The result class generated by the seqan3::seach algorithm.

Template Parameters
query_id_typeThe type of the query_id; must model std::integral.
cursor_typeThe type of the cursor; must model seqan3::fm_index_cursor_specialisation.
reference_id_typeThe type of the reference_id; must model std::integral.
reference_begin_position_typeThe type of the reference_begin_position; must model std::integral.

The seqan3::search algorithm returns a range of hits. A single hit is stored in a seqan3::search_result. By default, the search result contains the query id, the reference id where the query matched and the begin position in the reference where the query sequence starts to match the reference sequence. Those information can be accessed via the respective member functions.

The following member functions exist:

Note that the index cursor is not included in a hit by default. If you are trying to use the respective member function, a static_assert will prevent you from doing so. You can configure the result of the search with the output configuration.

Constructor & Destructor Documentation

◆ ~search_result()

template<typename query_id_type , typename cursor_type , typename reference_id_type , typename reference_begin_position_type >
seqan3::search_result< query_id_type, cursor_type, reference_id_type, reference_begin_position_type >::~search_result ( )
default

Defaulted.

Member Function Documentation

◆ index_cursor()

template<typename query_id_type , typename cursor_type , typename reference_id_type , typename reference_begin_position_type >
constexpr auto seqan3::search_result< query_id_type, cursor_type, reference_id_type, reference_begin_position_type >::index_cursor ( ) const
inlineconstexprnoexcept

Returns the index cursor pointing to the suffix array range where the query was found.

See also
seqan3::fm_index_cursor
seqan3::bi_fm_index_cursor

◆ reference_id()

template<typename query_id_type , typename cursor_type , typename reference_id_type , typename reference_begin_position_type >
constexpr auto seqan3::search_result< query_id_type, cursor_type, reference_id_type, reference_begin_position_type >::reference_id ( ) const
inlineconstexprnoexcept

Returns the reference id where the query was found.

The reference id is an arithmetic value that corresponds to the index of the reference text in the index. The order is determined on construction of the index.


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