[][src]Struct varisat::prop::assignment::Trail

pub struct Trail {
    trail: Vec<Lit>,
    queue_head_pos: usize,
    decisions: Vec<LitIdx>,
    units_removed: usize,
}

Decision and propagation history.

Fields

trail: Vec<Lit>

Stack of all propagated and all enqueued assignments

queue_head_pos: usize

Next assignment in trail to propagate

decisions: Vec<LitIdx>

Decision levels as trail indices.

units_removed: usize

Number of unit clauses removed from the trail.

Methods

impl Trail[src]

pub fn queue_head(&self) -> Option<Lit>[src]

Return the next assigned literal to propagate.

pub fn pop_queue(&mut self) -> Option<Lit>[src]

Return the next assigned literal to propagate and remove it from the queue.

pub fn reset_queue(&mut self)[src]

Re-enqueue all assigned literals.

pub fn trail(&self) -> &[Lit][src]

Assigned literals in assignment order.

pub fn clear(&mut self)[src]

Clear the trail.

This simply removes all entries without performing any backtracking. Can only be called with no active decisions.

pub fn new_decision_level(&mut self)[src]

Start a new decision level.

Does not enqueue the decision itself.

pub fn current_level(&self) -> usize[src]

Current decision level.

pub fn top_level_assignment_count(&self) -> usize[src]

The number of assignments at level 0.

pub fn fully_propagated(&self) -> bool[src]

Whether all assignments are processed.

Trait Implementations

impl Default for Trail[src]

Auto Trait Implementations

impl Send for Trail

impl Sync for Trail

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Reference, Outer, OuterFieldType, Inner> HasPart<Nested<Outer, Inner>> for Reference where
    Inner: Part,
    Outer: Part<PartType = Field<OuterFieldType>>,
    OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
    Reference: HasPart<Outer> + ?Sized