Struct splr::cdb::Clause

source ·
pub struct Clause {
    pub rank: u16,
    pub rank_old: u16,
    pub search_from: u16,
    /* private fields */
}
Expand description

A representation of ‘clause’

Fields§

§rank: u16

A static clause evaluation criterion like LBD, NDD, or something.

§rank_old: u16

A record of the rank at previos stage.

§search_from: u16

the index from which propagate starts searching an un-falsified literal. Since it’s just a hint, we don’t need u32 or usize.

Implementations§

source§

impl Clause

source

pub fn update_lbd( &mut self, asg: &impl AssignIF, lbd_temp: &mut [usize] ) -> usize

update rank field with the present LBD.

Trait Implementations§

source§

impl ClauseIF for Clause

source§

fn is_empty(&self) -> bool

return true if it contains no literals; a clause after unit propagation.
source§

fn is_dead(&self) -> bool

return true if it contains no literals; a clause after unit propagation.
source§

fn iter(&self) -> Iter<'_, Lit>

return an iterator over its literals.
source§

fn lit0(&self) -> Lit

return 1st watch
source§

fn lit1(&self) -> Lit

return 2nd watch
source§

fn contains(&self, lit: Lit) -> bool

return true if the clause contains the literal
source§

fn is_satisfied_under(&self, asg: &impl AssignIF) -> bool

check clause satisfiability
source§

fn len(&self) -> usize

return the number of literals.
source§

impl Clone for Clause

source§

fn clone(&self) -> Clause

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Clause

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Clause

source§

fn default() -> Clause

Returns the “default value” for a type. Read more
source§

impl Display for Clause

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FlagIF for Clause

§

type FlagType = FlagClause

source§

fn is(&self, flag: Self::FlagType) -> bool

return true if the flag in on.
source§

fn set(&mut self, f: Self::FlagType, b: bool)

set the flag.
source§

fn turn_off(&mut self, flag: Self::FlagType)

toggle the flag off.
source§

fn turn_on(&mut self, flag: Self::FlagType)

toggle the flag on.
source§

fn toggle(&mut self, flag: Self::FlagType)

source§

impl From<&Clause> for Vec<i32>

source§

fn from(c: &Clause) -> Vec<i32>

Converts to this type from the input type.
source§

impl Index<Range<usize>> for Clause

§

type Output = [Lit]

The returned type after indexing.
source§

fn index(&self, r: Range<usize>) -> &[Lit]

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeFrom<usize>> for Clause

§

type Output = [Lit]

The returned type after indexing.
source§

fn index(&self, r: RangeFrom<usize>) -> &[Lit]

Performs the indexing (container[index]) operation. Read more
source§

impl Index<usize> for Clause

§

type Output = Lit

The returned type after indexing.
source§

fn index(&self, i: usize) -> &Lit

Performs the indexing (container[index]) operation. Read more
source§

impl IndexMut<Range<usize>> for Clause

source§

fn index_mut(&mut self, r: Range<usize>) -> &mut [Lit]

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeFrom<usize>> for Clause

source§

fn index_mut(&mut self, r: RangeFrom<usize>) -> &mut [Lit]

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<usize> for Clause

source§

fn index_mut(&mut self, i: usize) -> &mut Lit

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<'a> IntoIterator for &'a Clause

§

type Item = &'a Lit

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, Lit>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a> IntoIterator for &'a mut Clause

§

type Item = &'a Lit

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, Lit>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl PartialEq for Clause

source§

fn eq(&self, other: &Clause) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Clause

source§

fn partial_cmp(&self, other: &Clause) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Eq for Clause

source§

impl StructuralPartialEq for Clause

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.