pub struct Cdcl {
pub kind: CdclKind,
pub frame: StackIdx,
pub propagates: Vec<LitIdx>,
pub conflicts: bool,
}Fields§
§kind: CdclKind§frame: StackIdx§propagates: Vec<LitIdx>After an assignment some clauses may have only 1 unassigned literal left (with all others not satisfying the clause). Thus a decision propagates other assignments which are required.
conflicts: boolImplementations§
Source§impl Cdcl
impl Cdcl
Sourcepub fn root(frame: StackIdx) -> Self
pub fn root(frame: StackIdx) -> Self
Creates the Root node of the CDCL tree. Should only be used once.
Sourcepub fn begin_check(parent: Option<CdclIdx>, frame: StackIdx) -> Self
pub fn begin_check(parent: Option<CdclIdx>, frame: StackIdx) -> Self
Creates a BeginCheck node in the CDCL tree.
Sourcepub fn new_empty(parent: CdclIdx, frame: StackIdx) -> Self
pub fn new_empty(parent: CdclIdx, frame: StackIdx) -> Self
Creates a Empty node in the CDCL tree.
pub fn new_decision(lit: LitIdx, frame: StackIdx) -> Self
pub fn new_conflict(conflict: Conflict, frame: StackIdx) -> Self
Sourcepub fn backlink(&self, cidx: CdclIdx) -> CdclBacklink
pub fn backlink(&self, cidx: CdclIdx) -> CdclBacklink
Return a pair of the previous node and the backtrack node. If the backtrack node is set then its the parent otherwise the previous node is
pub fn get_assignments(&self) -> impl Iterator<Item = LitIdx> + '_
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cdcl
impl RefUnwindSafe for Cdcl
impl Send for Cdcl
impl Sync for Cdcl
impl Unpin for Cdcl
impl UnwindSafe for Cdcl
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