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:
parent
f99d6171e9
commit
e78cd57210
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user