pub trait ProblemSolution: HasAssignments {
// Provided methods
fn num_propositional_variables(&self) -> usize { ... }
fn num_domains(&self) -> usize { ... }
fn get_propositional_variable_value(
&self,
propositional_variable: PropositionalVariable,
) -> bool { ... }
fn get_literal_value(&self, literal: Literal) -> bool { ... }
fn get_integer_value(&self, variable: impl IntegerVariable) -> i32 { ... }
}Expand description
A trait which specifies the common behaviours of Solution and SolutionReference.
Provided Methods§
sourcefn num_propositional_variables(&self) -> usize
fn num_propositional_variables(&self) -> usize
Returns the number of defined PropositionalVariables
sourcefn num_domains(&self) -> usize
fn num_domains(&self) -> usize
Returns the number of domains.
sourcefn 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.
sourcefn get_literal_value(&self, literal: Literal) -> bool
fn get_literal_value(&self, literal: Literal) -> bool
Returns the assigned boolean value of the provided Literal.
sourcefn 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.