Struct pblib_rs::EncodingResult
source · pub struct EncodingResult { /* private fields */ }
Expand description
The result of an encoding function.
This structure contains both the clauses generated to encode the constraint and the index of the next free variable id.
Implementations§
source§impl EncodingResult
impl EncodingResult
sourcepub fn clauses(&self) -> &[Vec<i32>]
pub fn clauses(&self) -> &[Vec<i32>]
Returns a reference to the clauses used to encode the constraint.
sourcepub fn next_free_var_id(&self) -> i32
pub fn next_free_var_id(&self) -> i32
Returns the next free variable id.
Encodings use auxiliary variables almost all the time. Functions that encode constraints ask the first variable id they can use for these auxiliary variables. In return, they tell the caller which is the lowest id that can be used after this encoding, that is, the highest auxiliary variable index plus 1.
Auto Trait Implementations§
impl RefUnwindSafe for EncodingResult
impl Send for EncodingResult
impl Sync for EncodingResult
impl Unpin for EncodingResult
impl UnwindSafe for EncodingResult
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