19
19
namespace raptor ::detail
20
20
{
21
21
22
- inline bool
23
- is_fpr_exceeded_impl (raptor_index<index_structure::hibf> const & index, size_t const ibf_idx, size_t const bin_idx)
22
+ inline bool is_fpr_exceeded_impl (raptor_index<index_structure::hibf> const & index,
23
+ size_t const ibf_idx,
24
+ size_t const bin_idx,
25
+ bool const is_toplevel)
24
26
{
25
27
auto & hibf = index .ibf ();
26
28
auto & ibf = hibf.ibf_vector [ibf_idx];
@@ -34,20 +36,20 @@ is_fpr_exceeded_impl(raptor_index<index_structure::hibf> const & index, size_t c
34
36
}();
35
37
36
38
bool const is_bin_merged = hibf.ibf_bin_to_user_bin_id [ibf_idx][bin_idx] == seqan::hibf::bin_kind::merged;
37
- double const target_fpr = is_bin_merged ? index .config ().relaxed_fpr : index .fpr ();
39
+ double const target_fpr = is_bin_merged ? ( index .config ().relaxed_fpr * (is_toplevel ? 1.1 : 1.0 )) : index .fpr ();
38
40
39
- return new_fpr > /* 1.1 * */ target_fpr; // TODO lenience?
41
+ return new_fpr > target_fpr;
40
42
}
41
43
42
44
inline bool is_fpr_exceeded (raptor_index<index_structure::hibf> const & index, insert_location const & insert_location)
43
45
{
44
- return is_fpr_exceeded_impl (index , insert_location.ibf_idx , insert_location.bin_idx );
46
+ return is_fpr_exceeded_impl (index , insert_location.ibf_idx , insert_location.bin_idx , false );
45
47
}
46
48
47
49
inline bool is_fpr_exceeded (raptor_index<index_structure::hibf> const & index,
48
50
rebuild_location const & rebuild_location)
49
51
{
50
- return is_fpr_exceeded_impl (index , rebuild_location.ibf_idx , rebuild_location.bin_idx );
52
+ return is_fpr_exceeded_impl (index , rebuild_location.ibf_idx , rebuild_location.bin_idx , true );
51
53
}
52
54
53
55
} // namespace raptor::detail
0 commit comments