1
0
mirror of https://github.com/ellmau/adf-obdd.git synced 2025-12-19 09:29:36 +01:00

Update lib/src/nogoods.rs

Co-authored-by: Maximilian Marx <mmarx@wh2.tu-dresden.de>
This commit is contained in:
Stefan Ellmauthaler 2022-06-21 18:15:44 +02:00 committed by GitHub
parent f99d6171e9
commit e78cd57210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,10 @@ impl NoGood {
pub fn update_term_vec(&self, term_vec: &[Term], update: &mut bool) -> Vec<Term> { pub fn update_term_vec(&self, term_vec: &[Term], update: &mut bool) -> Vec<Term> {
*update = false; *update = false;
term_vec.iter().enumerate().map(|(idx,val)|{ term_vec.iter().enumerate().map(|(idx,val)|{
let idx:u32 = idx.try_into().expect("no-good learner implementation is based on the assumption that only u32::MAX-many variables are in place"); let idx: u32 = idx.try_into().expect(
"no-good learner implementation is based on the assumption \
that only u32::MAX-many variables are in place",
);
if self.active.contains(idx){ if self.active.contains(idx){
if !val.is_truth_value() { if !val.is_truth_value() {
*update = true; *update = true;