Skip to content

Commit

Permalink
Merge branch 'linear-expl' into knapsack
Browse files Browse the repository at this point in the history
  • Loading branch information
arbimo committed Nov 8, 2024
2 parents 89d62d7 + 9934909 commit 920adbc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion solver/src/reasoners/stn/theory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ enum TheoryPropagationCause {
}

#[derive(Copy, Clone)]
#[allow(clippy::enum_variant_names)]
pub(crate) enum ModelUpdateCause {
/// The update was caused by an edge propagation
EdgePropagation(PropagatorId),
Expand All @@ -221,7 +222,7 @@ impl From<u32> for ModelUpdateCause {
impl From<ModelUpdateCause> for u32 {
fn from(cause: ModelUpdateCause) -> Self {
match cause {
ModelUpdateCause::EdgePropagation(edge) => (u32::from(edge) << 2) | 0b00,
ModelUpdateCause::EdgePropagation(edge) => u32::from(edge) << 2,
ModelUpdateCause::CyclicEdgePropagation(edge) => (u32::from(edge) << 2) | 0b01,
ModelUpdateCause::TheoryPropagation(index) => (index << 2) | 0b10,
}
Expand Down

0 comments on commit 920adbc

Please sign in to comment.