Skip to content

Commit

Permalink
refactor: one more part of system update fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukáš Chudíček committed Dec 7, 2023
1 parent c39cfde commit 924a5aa
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/update/update_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,18 @@ where
Expression::Terminal(proposition) => {
update_from_proposition::<DO, T>(acc, proposition);
}
_ => todo!(),
Expression::Not(expression) => {
update_max::<DO, T>(acc, expression);
}
Expression::And(clauses) | Expression::Or(clauses) => {
clauses
.iter()
.for_each(|clause| update_max::<DO, T>(acc, clause));
}
Expression::Xor(lhs, rhs) | Expression::Implies(lhs, rhs) => {
update_max::<DO, T>(acc, lhs);
update_max::<DO, T>(acc, rhs);
}
}
}

Expand Down

0 comments on commit 924a5aa

Please sign in to comment.