pub struct SolutionReference<'a> { /* private fields */ }Expand description
A solution which keeps reference to its inner structures.
Implementations§
source§impl<'a> SolutionReference<'a>
impl<'a> SolutionReference<'a>
pub fn new( assignments_propositional: &'a AssignmentsPropositional, assignments_integer: &'a AssignmentsInteger, ) -> SolutionReference<'a>
pub fn get_propostional_variables( &self, ) -> impl Iterator<Item = PropositionalVariable>
Trait Implementations§
source§impl<'a> Clone for SolutionReference<'a>
impl<'a> Clone for SolutionReference<'a>
source§fn clone(&self) -> SolutionReference<'a>
fn clone(&self) -> SolutionReference<'a>
Returns a copy 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<'a> Debug for SolutionReference<'a>
impl<'a> Debug for SolutionReference<'a>
source§impl From<SolutionReference<'_>> for Solution
impl From<SolutionReference<'_>> for Solution
source§fn from(value: SolutionReference<'_>) -> Self
fn from(value: SolutionReference<'_>) -> Self
Converts to this type from the input type.
source§impl ProblemSolution for SolutionReference<'_>
impl ProblemSolution for SolutionReference<'_>
source§fn num_propositional_variables(&self) -> usize
fn num_propositional_variables(&self) -> usize
Returns the number of defined
PropositionalVariablessource§fn num_domains(&self) -> usize
fn num_domains(&self) -> usize
Returns the number of domains.
source§fn get_propositional_variable_value(
&self,
propositional_variable: PropositionalVariable,
) -> bool
fn get_propositional_variable_value( &self, propositional_variable: PropositionalVariable, ) -> bool
Returns the assigned boolean value of the provided
PropositionalVariable.source§fn get_literal_value(&self, literal: Literal) -> bool
fn get_literal_value(&self, literal: Literal) -> bool
Returns the assigned boolean value of the provided
Literal.source§fn get_integer_value(&self, variable: impl IntegerVariable) -> i32
fn get_integer_value(&self, variable: impl IntegerVariable) -> i32
Returns the assigned integer value of the provided variable.
impl<'a> Copy for SolutionReference<'a>
Auto Trait Implementations§
impl<'a> Freeze for SolutionReference<'a>
impl<'a> RefUnwindSafe for SolutionReference<'a>
impl<'a> Send for SolutionReference<'a>
impl<'a> Sync for SolutionReference<'a>
impl<'a> Unpin for SolutionReference<'a>
impl<'a> UnwindSafe for SolutionReference<'a>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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