The SeqAn FM Index. More...
#include <seqan3/search/fm_index/fm_index.hpp>
Public Member Functions | |
iterator_type | begin () const noexcept |
Returns a seqan3::fm_index_iterator on the index that can be used for searching. More... | |
void | construct (text_t const &text) |
Constructs the index given a range. The range cannot be an rvalue (i.e. a temporary object) and has to be non-empty. More... | |
void | construct (text_t &&)=delete |
void | construct (text_t const &&)=delete |
bool | empty () const noexcept |
Checks whether the index is empty. More... | |
bool | load (filesystem::path const &path) |
Loads the index from disk. Temporary function until cereal is supported. More... | |
size_type | size () const noexcept |
Returns the length of the indexed text including sentinel characters. More... | |
bool | store (filesystem::path const &path) const |
Stores the index to disk. Temporary function until cereal is supported. More... | |
Constructors, destructor and assignment | |
fm_index ()=default | |
fm_index (fm_index const &)=default | |
fm_index & | operator= (fm_index const &)=default |
fm_index (fm_index &&)=default | |
fm_index & | operator= (fm_index &&)=default |
~fm_index ()=default | |
fm_index (text_t const &text) | |
Constructor that immediately constructs the index given a range. The range cannot be an rvalue (i.e. a temporary object) and has to be non-empty. More... | |
fm_index (text_t &&)=delete | |
fm_index (text_t const &&)=delete | |
Friends | |
template<typename bi_fm_index_t > | |
class | bi_fm_index_iterator |
template<typename fm_index_t > | |
class | fm_index_iterator |
Member types | |
using | text_type = text_t |
The type of the indexed text. | |
using | char_type = innermost_value_type_t< text_t > |
The type of the underlying character of text_type. | |
using | size_type = typename sdsl_index_type::size_type |
Type for representing positions in the indexed text. | |
using | iterator_type = fm_index_iterator< fm_index< text_t, fm_index_traits > > |
The type of the (unidirectional) iterator. | |
The SeqAn FM Index.
text_t | The type of the text to be indexed; must model std::ranges::ForwardRange. |
fm_index_traits | The traits determining the implementation of the underlying SDSL index; must model seqan3::fm_index_traits_concept. |
The seqan3::fm_index is a fast and space-efficient string index to search strings and collections of strings.
Here is a short example on how to build an index and search a pattern using an iterator. Please note that there is a very powerful search module with a high-level interface
Here is an example using a collection of strings (e.g. a genome with multiple chromosomes or a protein database):
Coming soon. Stay tuned!
|
inline |
Constructor that immediately constructs the index given a range. The range cannot be an rvalue (i.e. a temporary object) and has to be non-empty.
text_t | The type of range to construct from; must model std::ranges::RandomAccessRange. |
[in] | text | The text to construct from. |
|
delete |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
delete |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinenoexcept |
Returns a seqan3::fm_index_iterator on the index that can be used for searching.
Constant.
No-throw guarantee.
|
inline |
Constructs the index given a range. The range cannot be an rvalue (i.e. a temporary object) and has to be non-empty.
text_t | The type of range to construct from; must model std::ranges::RandomAccessRange. |
[in] | text | The text to construct from. |
No guarantees.
|
delete |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
delete |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinenoexcept |
Checks whether the index is empty.
true
if the index is empty, false
otherwise.Constant.
No-throw guarantee.
|
inline |
Loads the index from disk. Temporary function until cereal is supported.
true
if the index was successfully loaded from disk.Linear.
Strong exception guarantee.
|
inlinenoexcept |
Returns the length of the indexed text including sentinel characters.
Constant.
No-throw guarantee.
|
inline |
Stores the index to disk. Temporary function until cereal is supported.
true
if the index was successfully stored to disk.Linear.
Strong exception guarantee.