pub enum Var {
VarI {
min: i32,
max: i32,
},
VarF {
min: f32,
max: f32,
},
}Expand description
Domain for a decision variable
Variants§
Implementations§
Source§impl Var
impl Var
Sourcepub fn is_assigned(&self) -> bool
pub fn is_assigned(&self) -> bool
Assigned variables have a domain reduced to a singleton.
Sourcepub fn get_assignment(&self) -> Val
pub fn get_assignment(&self) -> Val
Extract assignment for decision variable.
§Panics
This function will panic if the decision variable is not assigned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Var
impl RefUnwindSafe for Var
impl Send for Var
impl Sync for Var
impl Unpin for Var
impl UnwindSafe for Var
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