Raptor 4.0.0-rc.1
A fast and space-efficient pre-filter
Loading...
Searching...
No Matches
raptor::raptor_index< data_t > Class Template Reference
+ Inheritance diagram for raptor::raptor_index< data_t >:
+ Collaboration diagram for raptor::raptor_index< data_t >:

Public Member Functions

void append_bin_path (std::vector< std::string > const &path)
 
std::vector< std::vector< std::string > > const & bin_path () const
 
auto const & config () const
 
double fpr () const
 
data_t & ibf ()
 
data_t const & ibf () const
 
bool is_hibf () const
 
template<seqan3::cereal_input_archive archive_t>
void load_parameters (archive_t &archive)
 
void mark_resized (size_t const ibf_idx)
 Records that the IBF at ibf_idx has been grown beyond the size its layout assigned to it.
 
size_t number_of_ibfs () const
 The number of IBFs, including the ones retired by an update.
 
size_t number_of_resized_ibfs () const
 The number of IBFs that have been grown beyond the size their layout assigned to them.
 
raptor_index & operator= (raptor_index &&)=default
 
raptor_index & operator= (raptor_index const &)=default
 
size_t original_number_of_ibfs () const
 The number of IBFs the index had when it was built from a layout.
 
uint8_t parts () const
 
 raptor_index (build_arguments const &arguments)
 
 raptor_index (raptor_index &&)=default
 
 raptor_index (raptor_index const &)=default
 
 raptor_index (window const window_size, seqan3::shape const shape, uint8_t const parts, std::vector< std::vector< std::string > > const &bin_path, seqan::hibf::config const &config, data_t &&ibf)
 
template<seqan3::cereal_archive archive_t>
void serialize (archive_t &archive)
 Serialisation support function.
 
seqan3::shape shape () const
 
void sync_resized (bool const value_for_new_ibfs)
 Matches the resize bookkeeping to the current number of IBFs.
 
bool was_resized (size_t const ibf_idx) const
 Whether the IBF at ibf_idx has already been grown beyond the size its layout assigned to it.
 
uint64_t window_size () const
 

Static Public Attributes

static constexpr uint32_t version {3u}
 

Private Attributes

std::vector< std::vector< std::string > > bin_path_ {}
 
seqan::hibf::config config_ {}
 
double fpr_ {}
 
data_t ibf_ {}
 
bool is_hibf_ {index_structure::is_hibf<data_t>}
 
size_t original_number_of_ibfs_ {}
 The number of IBFs the index had when it was built from a layout.
 
uint8_t parts_ {}
 
seqan3::shape shape_ {}
 
seqan::hibf::bit_vector was_resized_ {}
 Whether an IBF has already been grown beyond the size its layout assigned to it. Indexed by IBF index.
 
uint64_t window_size_ {}
 

Member Function Documentation

◆ number_of_ibfs()

template<index_structure::is_valid data_t = index_structure::ibf>
size_t raptor::raptor_index< data_t >::number_of_ibfs ( ) const
inline

The number of IBFs, including the ones retired by an update.

Read from the resize bookkeeping, which raptor::raptor_index::sync_resized keeps as large as ibf_.ibf_vector. Unlike ibf().ibf_vector.size(), this is also available after raptor::raptor_index::load_parameters.

◆ serialize()

template<index_structure::is_valid data_t = index_structure::ibf>
template<seqan3::cereal_archive archive_t>
void raptor::raptor_index< data_t >::serialize ( archive_t & archive)
inline

Serialisation support function.

Template Parameters
archive_tType of archive; must satisfy seqan3::cereal_archive.
Parameters
[in]archiveThe archive being serialised from/to.
Attention
These functions are never called directly.
See also
https://docs.seqan.de/seqan/3.2.0/group__io.html#serialisation
+ Here is the call graph for this function:

◆ sync_resized()

template<index_structure::is_valid data_t = index_structure::ibf>
void raptor::raptor_index< data_t >::sync_resized ( bool const value_for_new_ibfs)
inline

Matches the resize bookkeeping to the current number of IBFs.

Parameters
[in]value_for_new_ibfsThe value assigned to IBFs added since the last call.

Deriving the size from ibf_.ibf_vector keeps both in sync by construction.

+ Here is the caller graph for this function:

Member Data Documentation

◆ original_number_of_ibfs_

template<index_structure::is_valid data_t = index_structure::ibf>
size_t raptor::raptor_index< data_t >::original_number_of_ibfs_ {}
private

The number of IBFs the index had when it was built from a layout.

Updating grows the index beyond the layout it was built from. Comparing the current state against this value gives a measure of how far the index has drifted from a proper layout. Must be declared after ibf_, because the constructor reads ibf_.ibf_vector. Reset whenever the index is rebuilt in full.

◆ was_resized_

template<index_structure::is_valid data_t = index_structure::ibf>
seqan::hibf::bit_vector raptor::raptor_index< data_t >::was_resized_ {}
private

Whether an IBF has already been grown beyond the size its layout assigned to it. Indexed by IBF index.

Only meaningful for the HIBF; empty for a plain IBF index. Must be declared after ibf_, because the constructor sizes it from ibf_.ibf_vector. Use raptor::raptor_index::sync_resized to keep the size in sync with the number of IBFs.


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