AsVariable

Trait AsVariable 

Source
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§

Source

fn name(&self) -> &str

Variable name. Needs to be unique. See crate::util::UniqueNameGenerator

Source

fn is_integer(&self) -> bool

Whether the variable is forced to take only integer values

Source

fn lower_bound(&self) -> f64

Minimum allowed value for the variable

Source

fn upper_bound(&self) -> f64

Maximum allowed value for the variable

Implementations on Foreign Types§

Source§

impl<T: AsVariable> AsVariable for &T

Source§

fn name(&self) -> &str

Source§

fn is_integer(&self) -> bool

Source§

fn lower_bound(&self) -> f64

Source§

fn upper_bound(&self) -> f64

Implementors§