Raptor 4.0.0-rc.1
A fast and space-efficient pre-filter
Loading...
Searching...
No Matches
insert_user_bin.hpp File Reference

Provides raptor::insert_user_bin. More...

+ Include dependency graph for insert_user_bin.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void raptor::insert_user_bin (update_arguments const &arguments, raptor_index< index_structure::hibf > &index)
 Inserts the user bins listed in arguments.user_bins_to_insert into index.
 

Detailed Description

Provides raptor::insert_user_bin.

Author
Enrico Seiler <enrico.seiler AT fu-berlin.de>

Function Documentation

◆ insert_user_bin()

void raptor::insert_user_bin ( update_arguments const & arguments,
raptor_index< index_structure::hibf > & index )

Inserts the user bins listed in arguments.user_bins_to_insert into index.

Parameters
[in]argumentsThe update arguments.
[in,out]indexThe index to insert into.

Each user bin is inserted individually. For each one, a suitable IBF and a range of technical bins is determined (see raptor::detail::get_location), the k-mers are inserted there and into all merged bins on the path to the top-level IBF, and the index is rebuilt if that insertion degraded it too much:

  • If an IBF holds more technical bins than tmax allows, it is rebuilt. For the top-level IBF this means a full rebuild, for any other IBF a partial rebuild of the subtree it roots.
  • Otherwise, if inserting exceeded the target FPR of a bin, the subtree containing that bin is rebuilt partially, or fully if the bin lies in the top-level IBF.

A partial rebuild recomputes the layout of one subtree, a full rebuild recomputes the whole index from all user bins that have not been deleted, including the ones not inserted yet. Consequently, a full rebuild finishes the insertion of every remaining user bin, and this function returns right after it. Setting arguments.disable_partial_rebuild replaces every partial rebuild by a full one.

A full rebuild drops deleted user bins from the bin path and renumbers the remaining ones in their order, as if the deleted user bins never existed.

The rebuilds are counted in arguments.partial_rebuilds and arguments.full_rebuilds.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
Hide me