AssignmentImpls

Enum AssignmentImpls 

Source
pub enum AssignmentImpls {
    Vec(VecAssignment),
    HashMap(HashMapAssignment),
}
Expand description

Defines an enumeration of the possible assignment types. Allows for a rough dynamic dispatch.

Variants§

§

Vec(VecAssignment)

Vec assignment wrapper

§

HashMap(HashMapAssignment)

HashMap assignment wrapper

Trait Implementations§

Source§

impl Assignment for AssignmentImpls

Source§

fn new(n_vars: usize) -> Self

Creates a new assignment manager for n_vars variables. Read more
Source§

fn num_vars(&self) -> usize

Returns the total number of variables this assignment manager is configured for.
Source§

fn set(&mut self, var: Variable, b: bool)

Sets the truth value of a variable. Read more
Source§

fn reset(&mut self)

Resets all variables to the Unassigned state.
Source§

fn unassign(&mut self, var: Variable)

Sets a variable to the Unassigned state. Read more
Source§

fn get_solutions(&self) -> Solutions

Retrieves the current set of assigned variables as a Solutions object. Read more
Source§

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)

Assigns a truth value to a variable based on a literal. Read more
Source§

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>

Gets the truth value of a variable, if assigned. Read more
Source§

fn literal_value(&self, l: impl Literal) -> Option<bool>

Gets the truth value of a literal under the current assignment. Read more
Source§

fn unassigned(&self) -> impl Iterator<Item = Variable> + '_

Returns an iterator over all currently unassigned variables. Read more
Source§

impl Clone for AssignmentImpls

Source§

fn clone(&self) -> AssignmentImpls

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AssignmentImpls

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Index<usize> for AssignmentImpls

Source§

type Output = VarState

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for AssignmentImpls

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.