pub struct Variable {
pub name: String,
pub is_integer: bool,
pub lower_bound: f64,
pub upper_bound: f64,
}Expand description
A variable to optimize
Fields§
§name: StringThe variable name should be unique in the problem and have a name accepted by the solver
is_integer: boolWhether the variable is restricted to only integer values
lower_bound: f64-INFINITY if there is no lower bound
upper_bound: f64INFINITY if there is no upper bound
Trait Implementations§
Source§impl AsVariable for Variable
impl AsVariable for Variable
Source§fn name(&self) -> &str
fn name(&self) -> &str
Variable name. Needs to be unique. See crate::util::UniqueNameGenerator
Source§fn is_integer(&self) -> bool
fn is_integer(&self) -> bool
Whether the variable is forced to take only integer values
Source§fn lower_bound(&self) -> f64
fn lower_bound(&self) -> f64
Minimum allowed value for the variable
Source§fn upper_bound(&self) -> f64
fn upper_bound(&self) -> f64
Maximum allowed value for the 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 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