pub struct Variable {
pub name: NameId,
pub var_type: VariableType,
}Expand description
Represents a variable in a Linear Programming problem.
Fields§
§name: NameIdInterned name of the variable.
var_type: VariableTypeThe type of the variable.
Implementations§
Source§impl Variable
impl Variable
Sourcepub const fn set_var_type(&mut self, var_type: VariableType)
pub const fn set_var_type(&mut self, var_type: VariableType)
Setter to override VariableType.
Sourcepub const fn with_var_type(self, var_type: VariableType) -> Self
pub const fn with_var_type(self, var_type: VariableType) -> Self
Builder method for constructing a Variable with a non-default VariableType.
Trait Implementations§
impl StructuralPartialEq for Variable
Auto Trait Implementations§
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnsafeUnpin for Variable
impl UnwindSafe for Variable
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