pub struct Solution { /* private fields */ }Expand description
A solution which takes ownership of its inner structures.
Implementations§
source§impl Solution
impl Solution
pub fn new( assignments_propositional: AssignmentsPropositional, assignments_integer: AssignmentsInteger, ) -> Self
pub fn as_reference(&self) -> SolutionReference<'_>
Trait Implementations§
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 Solution
impl ProblemSolution for Solution
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.
Auto Trait Implementations§
impl Freeze for Solution
impl RefUnwindSafe for Solution
impl Send for Solution
impl Sync for Solution
impl Unpin for Solution
impl UnwindSafe for Solution
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