pub enum Conflict<T: Literal, S: LiteralStorage<T>> {
Ground,
Unit(Clause<T, S>),
Learned(usize, Clause<T, S>),
Restart(Clause<T, S>),
}Expand description
Represents the outcome of a conflict analysis.
This enum categorises the result of analysing a conflict, which guides the solver’s next actions (e.g. learning a clause, backtracking, restarting).
§Type Parameters
T: The type ofLiteralused in clauses.S: TheLiteralStoragetype used within clauses.
Variants§
Ground
A conflict at decision level 0 (ground level) was found. This means the original formula is unsatisfiable. No clause is learnt.
Unit(Clause<T, S>)
A unit clause was learnt from the conflict. This clause will propagate a literal immediately after backtracking.
Learned(usize, Clause<T, S>)
A non-unit clause was learnt.
The usize is the index of the asserting literal within the learnt clause.
The Learned variant indicates the clause is asserting at some backtrack level.
Restart(Clause<T, S>)
The conflict analysis suggests a restart is beneficial.
Trait Implementations§
Source§impl<T: Ord + Literal, S: Ord + LiteralStorage<T>> Ord for Conflict<T, S>
impl<T: Ord + Literal, S: Ord + LiteralStorage<T>> Ord for Conflict<T, S>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd + Literal, S: PartialOrd + LiteralStorage<T>> PartialOrd for Conflict<T, S>
impl<T: PartialOrd + Literal, S: PartialOrd + LiteralStorage<T>> PartialOrd for Conflict<T, S>
impl<T: Eq + Literal, S: Eq + LiteralStorage<T>> Eq for Conflict<T, S>
impl<T: Literal, S: LiteralStorage<T>> StructuralPartialEq for Conflict<T, S>
Auto Trait Implementations§
impl<T, S> Freeze for Conflict<T, S>where
S: Freeze,
impl<T, S> RefUnwindSafe for Conflict<T, S>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> !Send for Conflict<T, S>
impl<T, S> !Sync for Conflict<T, S>
impl<T, S> Unpin for Conflict<T, S>where
S: Unpin,
impl<T, S> UnwindSafe for Conflict<T, S>where
S: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more