[][src]Struct rate_common::clausedatabase::WitnessDatabase

pub struct WitnessDatabase { /* fields omitted */ }

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]

Trait Implementations

impl HeapSpace for WitnessDatabase[src]

impl PartialEq<WitnessDatabase> for WitnessDatabase[src]

impl Index<usize> for WitnessDatabase[src]

type Output = Literal

The returned type after indexing.

impl IndexMut<usize> for WitnessDatabase[src]

impl Debug for WitnessDatabase[src]

Auto Trait Implementations

Blanket Implementations

impl<T> HeapSpace for T where
    T: Copy
[src]

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]