pub struct Solution(/* private fields */);Expand description
Assignment for decision variables that satisfies all constraints.
Implementations§
Source§impl Solution
impl Solution
Sourcepub fn get_values(&self, vs: &[VarId]) -> Vec<Val>
pub fn get_values(&self, vs: &[VarId]) -> Vec<Val>
Get assignments for the decision variables provided as a slice.
Sourcepub fn get_values_array<const N: usize>(&self, vs: &[VarId; N]) -> [Val; N]
pub fn get_values_array<const N: usize>(&self, vs: &[VarId; N]) -> [Val; N]
Get assignments for the decision variables provided as a reference to an array.
Sourcepub fn get_values_iter<'a, I>(&'a self, vs: I) -> impl Iterator<Item = Val> + 'a
pub fn get_values_iter<'a, I>(&'a self, vs: I) -> impl Iterator<Item = Val> + 'a
Get assignments for the provided decision variables.
Sourcepub fn get_value_binary(&self, v: impl Borrow<VarIdBin>) -> bool
pub fn get_value_binary(&self, v: impl Borrow<VarIdBin>) -> bool
Get binary assignment for the provided decision variable.
Sourcepub fn get_values_binary(&self, vs: &[VarIdBin]) -> Vec<bool>
pub fn get_values_binary(&self, vs: &[VarIdBin]) -> Vec<bool>
Get binary assignments for the decision variables provided as a slice.
Sourcepub fn get_values_binary_array<const N: usize>(
&self,
vs: &[VarIdBin; N],
) -> [bool; N]
pub fn get_values_binary_array<const N: usize>( &self, vs: &[VarIdBin; N], ) -> [bool; N]
Get binary assignments for the decision variables provided as a reference to an array.
Sourcepub fn get_values_binary_iter<'a, I>(
&'a self,
vs: I,
) -> impl Iterator<Item = bool> + 'a
pub fn get_values_binary_iter<'a, I>( &'a self, vs: I, ) -> impl Iterator<Item = bool> + 'a
Get binary assignments for the provided decision variables.
Trait Implementations§
Source§impl Ord for Solution
impl Ord for Solution
Source§impl PartialOrd for Solution
impl PartialOrd for Solution
impl Eq for Solution
impl StructuralPartialEq for Solution
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