pub trait AsVariable {
// Required methods
fn name(&self) -> &str;
fn is_integer(&self) -> bool;
fn lower_bound(&self) -> f64;
fn upper_bound(&self) -> f64;
}Expand description
A type that represents a variable. See crate::problem::Variable.
Required Methods§
Sourcefn name(&self) -> &str
fn name(&self) -> &str
Variable name. Needs to be unique. See crate::util::UniqueNameGenerator
Sourcefn is_integer(&self) -> bool
fn is_integer(&self) -> bool
Whether the variable is forced to take only integer values
Sourcefn lower_bound(&self) -> f64
fn lower_bound(&self) -> f64
Minimum allowed value for the variable
Sourcefn upper_bound(&self) -> f64
fn upper_bound(&self) -> f64
Maximum allowed value for the variable