pub struct Constraint { /* private fields */ }
Implementations§
Source§impl Constraint
impl Constraint
pub fn new( ty: ConstraintType, rhs: f64, name: Option<String>, vars: Vec<(VariableId, f64)>, ) -> Constraint
pub fn name(&self) -> Option<&str>
pub fn weights(&self) -> &[(VariableId, f64)]
pub fn rhs(&self) -> f64
pub fn type_(&self) -> ConstraintType
Trait Implementations§
Source§impl Clone for Constraint
impl Clone for Constraint
Source§fn clone(&self) -> Constraint
fn clone(&self) -> Constraint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for Constraint
impl RefUnwindSafe for Constraint
impl Send for Constraint
impl Sync for Constraint
impl Unpin for Constraint
impl UnwindSafe for Constraint
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