pumpkin_solver::results

Trait ProblemSolution

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

source

fn num_propositional_variables(&self) -> usize

Returns the number of defined PropositionalVariables

source

fn num_domains(&self) -> usize

Returns the number of domains.

source

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

Returns the assigned boolean value of the provided Literal.

source

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.

Implementors§