pub enum AssignmentImpls {
Vec(VecAssignment),
HashMap(HashMapAssignment),
}Expand description
Defines an enumeration of the possible assignment types. Allows for a rough dynamic dispatch.
Variants§
Trait Implementations§
Source§impl Assignment for AssignmentImpls
impl Assignment for AssignmentImpls
Source§fn new(n_vars: usize) -> Self
fn new(n_vars: usize) -> Self
Creates a new assignment manager for
n_vars variables. Read moreSource§fn num_vars(&self) -> usize
fn num_vars(&self) -> usize
Returns the total number of variables this assignment manager is configured for.
Source§fn get_solutions(&self) -> Solutions
fn get_solutions(&self) -> Solutions
Retrieves the current set of assigned variables as a
Solutions object. Read moreSource§fn all_assigned(&self) -> bool
fn all_assigned(&self) -> bool
Checks if all variables managed by this assignment are currently assigned. Read more
Source§fn assign(&mut self, l: impl Literal)
fn assign(&mut self, l: impl Literal)
Assigns a truth value to a variable based on a literal. Read more
Source§fn is_assigned(&self, var: Variable) -> bool
fn is_assigned(&self, var: Variable) -> bool
Checks if a specific variable is assigned a truth value. Read more
Source§fn var_value(&self, var: Variable) -> Option<bool>
fn var_value(&self, var: Variable) -> Option<bool>
Gets the truth value of a variable, if assigned. Read more
Source§impl Clone for AssignmentImpls
impl Clone for AssignmentImpls
Source§fn clone(&self) -> AssignmentImpls
fn clone(&self) -> AssignmentImpls
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 AssignmentImpls
impl Debug for AssignmentImpls
Source§impl Index<usize> for AssignmentImpls
impl Index<usize> for AssignmentImpls
Auto Trait Implementations§
impl Freeze for AssignmentImpls
impl RefUnwindSafe for AssignmentImpls
impl Send for AssignmentImpls
impl Sync for AssignmentImpls
impl Unpin for AssignmentImpls
impl UnwindSafe for AssignmentImpls
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<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