SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
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_result & | operator= (search_result const &)=default |
Defaulted. | |
search_result & | operator= (search_result &&)=default |
Defaulted. | |
~search_result ()=default | |
Defaulted. | |
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. | |
constexpr auto | reference_id () const noexcept(!(std::same_as< reference_id_type, detail::empty_type >)) |
Returns the reference id where the query was found. | |
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 | |
template<typename search_configuration_t > | |
struct | detail::policy_search_result_builder |
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. | |
The result class generated by the seqan3::seach algorithm.
query_id_type | The type of the query_id; must model std::integral. |
cursor_type | The type of the cursor; must model seqan3::detail::template_specialisation_of a seqan3::fm_index_cursor or a seqan3::bi_fm_index_cursor |
reference_id_type | The type of the reference_id; must model std::integral. |
reference_begin_position_type | The 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.
|
inlineconstexprnoexcept |
Returns the index cursor pointing to the suffix array range where the query was found.
|
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.