[−][src]Struct rate_common::clausedatabase::WitnessDatabase
Stores witnesses in a flat buffer
Each witness is a set of literals that are associated with a clause.
Methods
impl WitnessDatabase[src]
pub fn new() -> WitnessDatabase[src]
Create an empty witness database.
pub fn open_witness(&mut self) -> Clause[src]
Make a new witness.
Similar to open_clause().
pub fn push_literal(&mut self, literal: Literal)[src]
Add a literal to the current witness. Finish the witness if the literal is 0.
This must be called after a call to open_witness()
but before the call to close_witness().
Similar to push_literal().
pub fn witness_to_string(&self, clause: Clause) -> String[src]
Give the DIMACS representation of a witness.
Similar to clause_to_string().
pub fn witness(&self, clause: Clause) -> &[Literal][src]
The literals in the the witness.
pub fn witness_range(&self, clause: Clause) -> Range<usize>[src]
The internal offsets of the literals in the the witness.
pub fn shrink_to_fit(&mut self)[src]
See Vec::shrink_to_fit().
Trait Implementations
impl HeapSpace for WitnessDatabase[src]
fn heap_space(&self) -> usize[src]
impl PartialEq<WitnessDatabase> for WitnessDatabase[src]
fn eq(&self, other: &WitnessDatabase) -> bool[src]
fn ne(&self, other: &WitnessDatabase) -> bool[src]
impl Index<usize> for WitnessDatabase[src]
type Output = Literal
The returned type after indexing.
fn index(&self, offset: usize) -> &Literal[src]
impl IndexMut<usize> for WitnessDatabase[src]
impl Debug for WitnessDatabase[src]
Auto Trait Implementations
impl Send for WitnessDatabase
impl Unpin for WitnessDatabase
impl Sync for WitnessDatabase
impl UnwindSafe for WitnessDatabase
impl RefUnwindSafe for WitnessDatabase
Blanket Implementations
impl<T> HeapSpace for T where
T: Copy, [src]
T: Copy,
fn heap_space(&Self) -> usize[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,