pub struct ConstraintHints {
pub one_hot_constraints: Vec<OneHot>,
pub sos1_constraints: Vec<Sos1>,
}
Fields§
§one_hot_constraints: Vec<OneHot>
§sos1_constraints: Vec<Sos1>
Implementations§
Source§impl ConstraintHints
impl ConstraintHints
pub fn is_empty(&self) -> bool
Sourcepub fn partial_evaluate(
&mut self,
state: State,
atol: ATol,
) -> Result<State, ConstraintHintsError>
pub fn partial_evaluate( &mut self, state: State, atol: ATol, ) -> Result<State, ConstraintHintsError>
Partially evaluate all constraint hints with the given state.
This method modifies the constraint hints in-place by:
- Removing constraints that are satisfied or cannot be satisfied
- Updating constraints by removing variables fixed to 0
Returns a new State containing the original state plus any additional variable fixings discovered through constraint propagation.
The process iterates until no more variable fixings are discovered, ensuring all constraint propagations are applied.
Trait Implementations§
Source§impl Clone for ConstraintHints
impl Clone for ConstraintHints
Source§fn clone(&self) -> ConstraintHints
fn clone(&self) -> ConstraintHints
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ConstraintHints
impl Debug for ConstraintHints
Source§impl Default for ConstraintHints
impl Default for ConstraintHints
Source§fn default() -> ConstraintHints
fn default() -> ConstraintHints
Returns the “default value” for a type. Read more
Source§impl From<ConstraintHints> for ConstraintHints
impl From<ConstraintHints> for ConstraintHints
Source§fn from(value: ConstraintHints) -> Self
fn from(value: ConstraintHints) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ConstraintHints
impl PartialEq for ConstraintHints
impl Eq for ConstraintHints
impl StructuralPartialEq for ConstraintHints
Auto Trait Implementations§
impl Freeze for ConstraintHints
impl RefUnwindSafe for ConstraintHints
impl Send for ConstraintHints
impl Sync for ConstraintHints
impl Unpin for ConstraintHints
impl UnwindSafe for ConstraintHints
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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