21namespace raptor::detail
27 [[maybe_unused]]
size_t const number_of_ibfs = index.ibf().ibf_vector.size();
32 assert(level < number_of_ibfs &&
"Cycle in the chain of parent IBFs.");
34 ibf_idx = index.ibf().prev_ibf_id[ibf_idx].ibf_idx;
51 auto const & hibf = index.ibf();
52 auto const & ibf = hibf.ibf_vector[ibf_idx];
54 double const new_fpr = [&ibf, bin_idx]()
56 double const exp_arg =
57 (ibf.hash_function_count() * ibf.occupancy[bin_idx]) /
static_cast<double>(ibf.bin_size());
58 double const log_arg = 1.0 -
std::exp(-exp_arg);
62 bool const is_bin_merged = hibf.ibf_bin_to_user_bin_id[ibf_idx][bin_idx] == seqan::hibf::bin_kind::merged;
63 double const target_fpr = [&]() ->
double
73 double const relaxed_fpr = index.config().relaxed_fpr;
74 double const factor = 1.0 + 1.0 / ((level + 1u) * (level + 1u));
78 return new_fpr > target_fpr;
Provides raptor::raptor_index.
size_t level_of(raptor_index< index_structure::hibf > const &index, size_t ibf_idx)
The level of the IBF at ibf_idx within the HIBF. The top-level IBF has level 0.
Definition is_fpr_exceeded.hpp:25
bool is_fpr_exceeded(raptor_index< index_structure::hibf > const &index, insert_location const &insert_location)
Whether the first bin of insert_location exceeds its target FPR.
Definition is_fpr_exceeded.hpp:82
bool is_fpr_exceeded_impl(raptor_index< index_structure::hibf > const &index, size_t const ibf_idx, size_t const bin_idx, size_t const level)
Whether the technical bin at bin_idx in the IBF at ibf_idx exceeds its target FPR.
Definition is_fpr_exceeded.hpp:46
Provides the helper types shared by the raptor::insert_user_bin implementation.
A range of consecutive technical bins within one IBF, i.e. where a user bin is stored.
Definition src/update/insert/strong_types.hpp:36
size_t bin_idx
The first technical bin of the range.
Definition src/update/insert/strong_types.hpp:39
A merged bin whose subtree needs to be rebuilt.
Definition src/update/insert/strong_types.hpp:46
size_t ibf_idx
The IBF containing the merged bin, i.e. the parent of the subtree to rebuild.
Definition src/update/insert/strong_types.hpp:48
size_t bin_idx
The merged bin within that IBF.
Definition src/update/insert/strong_types.hpp:50