 |
SeqAn3
3.0.1
The Modern C++ library for sequence analysis.
|
|
Go to the documentation of this file.
70 using sdsl_index_type = sdsl_index_type_;
74 using rev_sdsl_index_type = sdsl_index_type_;
79 using sdsl_char_type =
typename sdsl_index_type::alphabet_type::char_type;
82 using sdsl_sigma_type =
typename sdsl_index_type::alphabet_type::sigma_type;
116 template <std::ranges::range text_t>
120 void construct(text_t && text)
122 static_assert(std::ranges::bidirectional_range<text_t>,
"The text must model bidirectional_range.");
125 "The alphabet of the text collection must be convertible to the alphabet of the index.");
126 static_assert(dimension_v<text_t> == 1,
"The input cannot be a text collection.");
129 if (std::ranges::begin(text) == std::ranges::end(text))
132 auto rev_text = std::views::reverse(text);
138 template <std::ranges::range text_t>
142 void construct(text_t && text)
144 static_assert(std::ranges::bidirectional_range<text_t>,
"The text must model bidirectional_range.");
146 "The elements of the text collection must model bidirectional_range.");
149 "The alphabet of the text collection must be convertible to the alphabet of the index.");
150 static_assert(dimension_v<text_t> == 2,
"The input must be a text collection.");
153 if (std::ranges::begin(text) == std::ranges::end(text))
156 auto rev_text = text | views::deep{std::views::reverse} | std::views::reverse;
187 template <
typename bi_fm_index_t>
208 template <std::ranges::range text_t>
211 construct(std::forward<text_t>(text));
228 return fwd_fm.
size();
276 return !(*
this == rhs);
341 template <cereal_archive archive_t>
342 void CEREAL_SERIALIZE_FUNCTION_NAME(archive_t & archive)
353 template <std::ranges::range text_t>
The text is a single range.
Definition: concept.hpp:84
bool empty() const noexcept
Checks whether the index is empty.
Definition: bi_fm_index.hpp:242
fwd_cursor_type fwd_begin() const noexcept
Returns a unidirectional seqan3::fm_index_cursor on the original text of the bidirectional index that...
Definition: bi_fm_index.hpp:310
typename reference< t >::type reference_t
Shortcut for seqan3::reference (transformation_trait shortcut).
Definition: pre.hpp:77
~bi_fm_index()=default
Defaulted.
bool operator==(bi_fm_index const &rhs) const noexcept
Compares two indices.
Definition: bi_fm_index.hpp:258
bi_fm_index & operator=(bi_fm_index const &)=default
Defaulted.
This header includes C++17 filesystem support and imports it into namespace seqan3::filesystem (indep...
The SeqAn Bidirectional FM Index.
Definition: bi_fm_index.hpp:64
typename fm_index_type::alphabet_type alphabet_type
The type of the underlying character of the indexed text.
Definition: bi_fm_index.hpp:170
text_layout
The possible text layouts (single, collection) the seqan3::fm_index and seqan3::bi_fm_index can suppo...
Definition: concept.hpp:81
The text is a range of ranges.
Definition: concept.hpp:86
typename sdsl_index_type::size_type size_type
Type for representing positions in the indexed text.
Definition: bi_fm_index.hpp:172
bi_fm_index(text_t &&) -> bi_fm_index< innermost_value_type_t< text_t >, text_layout
Deduces the dimensions of the text.
Definition: bi_fm_index.hpp:355
static constexpr text_layout text_layout_mode
Indicates whether index is built over a collection.
Definition: bi_fm_index.hpp:164
alphabet_t alphabet_type
The type of the underlying character of the indexed text.
Definition: fm_index.hpp:326
Provides various transformation traits used by the range module.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:36
Provides seqan3::views::persist.
The concept std::convertible_to<From, To> specifies that an expression of the type and value category...
size_type size() const noexcept
Returns the length of the indexed text including sentinel characters.
Definition: fm_index.hpp:406
sdsl_wt_index_type default_sdsl_index_type
The default FM Index Configuration.
Definition: fm_index.hpp:92
Adaptations of concepts from the Ranges TS.
bi_fm_index(text_t &&text)
Constructor that immediately constructs the index given a range. The range cannot be empty.
Definition: bi_fm_index.hpp:209
The SeqAn Bidirectional FM Index Cursor.
Definition: bi_fm_index_cursor.hpp:55
cursor_type begin() const noexcept
Returns a seqan3::bi_fm_index_cursor on the index that can be used for searching.
Definition: bi_fm_index.hpp:293
typename innermost_value_type< t >::type innermost_value_type_t
Shortcut for seqan3::innermost_value_type (transformation_trait shortcut).
Definition: range.hpp:191
The SeqAn FM Index Cursor.
Definition: fm_index_cursor.hpp:59
Provides the seqan3::bi_fm_index_cursor for searching in the bidirectional seqan3::bi_fm_index.
rev_cursor_type rev_begin() const noexcept
Returns a unidirectional seqan3::fm_index_cursor on the reversed text of the bidirectional index that...
Definition: bi_fm_index.hpp:329
bi_fm_index()=default
Defaulted.
bool operator!=(bi_fm_index const &rhs) const noexcept
Compares two indices.
Definition: bi_fm_index.hpp:274
Provides the unidirectional seqan3::fm_index.
The basis for seqan3::alphabet, but requires only rank interface (not char).
constexpr auto alphabet_size
A type trait that holds the size of a (semi-)alphabet.
Definition: concept.hpp:706
size_type size() const noexcept
Returns the length of the indexed text including sentinel characters.
Definition: bi_fm_index.hpp:226