pub struct TwoProduct<Sub = Pairwise> { /* private fields */ }Expand description
Implementations of the 2-product at-most-1 encoding.
§References
- Jingchao Chen: A New SAT Encoding of the At-Most-One Constraint, ModRef 2010.
Trait Implementations§
Source§impl<Sub: Debug> Debug for TwoProduct<Sub>
impl<Sub: Debug> Debug for TwoProduct<Sub>
Source§impl<Sub: Default> Default for TwoProduct<Sub>
impl<Sub: Default> Default for TwoProduct<Sub>
Source§fn default() -> TwoProduct<Sub>
fn default() -> TwoProduct<Sub>
Returns the “default value” for a type. Read more
Source§impl<'de, Sub> Deserialize<'de> for TwoProduct<Sub>
impl<'de, Sub> Deserialize<'de> for TwoProduct<Sub>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<Sub> Encode for TwoProduct<Sub>
impl<Sub> Encode for TwoProduct<Sub>
Source§fn encode<Col>(
&mut self,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
) -> Result<(), OutOfMemory>where
Col: CollectClauses,
fn encode<Col>(
&mut self,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
) -> Result<(), OutOfMemory>where
Col: CollectClauses,
Encodes and enforces the at-most-1 constraint Read more
Source§impl<Sub> EncodeStats for TwoProduct<Sub>
impl<Sub> EncodeStats for TwoProduct<Sub>
Source§impl<Sub> Extend<Lit> for TwoProduct<Sub>
impl<Sub> Extend<Lit> for TwoProduct<Sub>
Source§fn extend<T: IntoIterator<Item = Lit>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Lit>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<Sub> FromIterator<Lit> for TwoProduct<Sub>
impl<Sub> FromIterator<Lit> for TwoProduct<Sub>
Source§impl<Sub> IterInputs for TwoProduct<Sub>
impl<Sub> IterInputs for TwoProduct<Sub>
Auto Trait Implementations§
impl<Sub> Freeze for TwoProduct<Sub>
impl<Sub> RefUnwindSafe for TwoProduct<Sub>where
Sub: RefUnwindSafe,
impl<Sub> Send for TwoProduct<Sub>where
Sub: Send,
impl<Sub> Sync for TwoProduct<Sub>where
Sub: Sync,
impl<Sub> Unpin for TwoProduct<Sub>where
Sub: Unpin,
impl<Sub> UnwindSafe for TwoProduct<Sub>where
Sub: UnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more