Skip to content

Commit

Permalink
bnb tries fixed for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoZ666 committed Oct 22, 2024
1 parent eaad338 commit b3f3acc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,14 @@ fn bnb(
return Some(selected_inputs.to_vec());
}

// Decrement of bnb_tries for every iteration
*bnb_tries -= 1;
// Capping the number of iterations on the computation
if *bnb_tries == 0 || depth >= inputs_in_desc_value.len() {
return None;
}
if rng.gen_bool(0.5) {
// Decrement of bnb_tries for every iteration
*bnb_tries -= 1;

// exploring the inclusion branch
// first include then omit
let new_effective_value = acc_eff_value
Expand Down

0 comments on commit b3f3acc

Please sign in to comment.