pub struct DynamicPolyWatchdogCell<'totdb> { /* private fields */ }Expand description
Implementations§
Trait Implementations§
Source§impl BoundUpper for DynamicPolyWatchdogCell<'_>
impl BoundUpper for DynamicPolyWatchdogCell<'_>
Source§fn encode_ub<Col, R>(
&mut self,
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
) -> Result<(), OutOfMemory>
fn encode_ub<Col, R>( &mut self, range: R, collector: &mut Col, var_manager: &mut dyn ManageVars, ) -> Result<(), OutOfMemory>
Lazily builds the pseudo-boolean encoding to enable upper bounds within
a given range.
var_manager is the variable manager to use for tracking
new variables. A specific encoding might ignore the upper or lower end
of the range. Read moreSource§fn enforce_ub(&self, ub: usize) -> Result<Vec<Lit>, EnforceError>
fn enforce_ub(&self, ub: usize) -> Result<Vec<Lit>, EnforceError>
Returns assumptions/units for enforcing an upper bound (
weighted sum of lits <= ub). Make sure that BoundUpper::encode_ub has been called
adequately and nothing has been called afterwards. Read moreSource§impl BoundUpperIncremental for DynamicPolyWatchdogCell<'_>
impl BoundUpperIncremental for DynamicPolyWatchdogCell<'_>
Source§fn encode_ub_change<Col, R>(
&mut self,
range: R,
collector: &mut Col,
var_manager: &mut dyn ManageVars,
) -> Result<(), OutOfMemory>
fn encode_ub_change<Col, R>( &mut self, range: R, collector: &mut Col, var_manager: &mut dyn ManageVars, ) -> Result<(), OutOfMemory>
Lazily builds the change in pseudo-boolean encoding to enable upper
bounds from within the range. A change might be added literals or
changed bounds.
var_manager is the variable manager to use for
tracking new variables. A specific encoding might ignore the lower or
upper end of the range. Read moreSource§impl<'totdb> Debug for DynamicPolyWatchdogCell<'totdb>
impl<'totdb> Debug for DynamicPolyWatchdogCell<'totdb>
Source§impl Encode for DynamicPolyWatchdogCell<'_>
impl Encode for DynamicPolyWatchdogCell<'_>
Source§fn weight_sum(&self) -> usize
fn weight_sum(&self) -> usize
Get the sum of weights in the encoding
Source§fn next_higher(&self, val: usize) -> usize
fn next_higher(&self, val: usize) -> usize
Gets the next higher value possible to be achieved by the weighted sum.
Might simply return
val + 1 if no stronger value can be inferred.Source§fn next_lower(&self, val: usize) -> usize
fn next_lower(&self, val: usize) -> usize
Gets the next lower value possible to be achieved by the weighted sum.
Might simply return
val - 1 if no stronger value can be inferred.Source§impl EncodeIncremental for DynamicPolyWatchdogCell<'_>
impl EncodeIncremental for DynamicPolyWatchdogCell<'_>
Source§fn reserve(&mut self, var_manager: &mut dyn ManageVars)
fn reserve(&mut self, var_manager: &mut dyn ManageVars)
Reserves all variables this encoding might need
Auto Trait Implementations§
impl<'totdb> Freeze for DynamicPolyWatchdogCell<'totdb>
impl<'totdb> !RefUnwindSafe for DynamicPolyWatchdogCell<'totdb>
impl<'totdb> !Send for DynamicPolyWatchdogCell<'totdb>
impl<'totdb> !Sync for DynamicPolyWatchdogCell<'totdb>
impl<'totdb> Unpin for DynamicPolyWatchdogCell<'totdb>
impl<'totdb> UnsafeUnpin for DynamicPolyWatchdogCell<'totdb>
impl<'totdb> !UnwindSafe for DynamicPolyWatchdogCell<'totdb>
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