Loading...
Searching...
No Matches
seqan3::search_result< query_id_type, cursor_type, reference_id_type, reference_begin_position_type > Class Template Reference
Search

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

`#include <seqan3/search/search_result.hpp>`

Inheritance diagram for seqan3::search_result< query_id_type, cursor_type, reference_id_type, reference_begin_position_type >:
[legend]

## 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.

## Detailed Description

template<typename query_id_type, typename cursor_type, typename reference_id_type, typename reference_begin_position_type>
requires (std::integral<query_id_type> || std::same_as<query_id_type, detail::empty_type>) && (detail::template_specialisation_of<cursor_type, fm_index_cursor> || detail::template_specialisation_of<cursor_type, bi_fm_index_cursor> || std::same_as<cursor_type, detail::empty_type>) && (std::integral<reference_id_type> || std::same_as<reference_id_type, detail::empty_type>) && (std::integral<reference_begin_position_type> || std::same_as<reference_begin_position_type, detail::empty_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.

See also
  search

Template Parameters

  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:

- seqan3::search_result::query_id()
- seqan3::search_result::index_cursor()
- seqan3::search_result::reference_id()
- seqan3::search_result::reference_begin_position()

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.

## Member Function Documentation

## index_cursor()

template<typename query_id_type, typename cursor_type, typename reference_id_type, typename reference_begin_position_type>

auto seqan3::search_result< query_id_type, cursor_type, reference_id_type, reference_begin_position_type >::index_cursor | ( |  | ) | const

inline constexpr noexcept

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>

auto seqan3::search_result< query_id_type, cursor_type, reference_id_type, reference_begin_position_type >::reference_id | ( |  | ) | const

inline constexpr noexcept

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:

- search_result.hpp

Hide me