Var

Struct Var 

Source
pub struct Var { /* private fields */ }
Expand description

A Gurobi variable.

To interact with the attributes of a variable, use Model::get_obj_attr and Model::set_obj_attr

Trait Implementations§

Source§

impl Add<Expr> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Expr) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for Expr

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for f32

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for f64

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for i16

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for i32

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for i64

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for i8

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for isize

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for u16

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for u32

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for u64

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for u8

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<Var> for usize

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Var) -> Expr

Performs the + operation. Read more
Source§

impl Add<f32> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: f32) -> Expr

Performs the + operation. Read more
Source§

impl Add<f64> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: f64) -> Expr

Performs the + operation. Read more
Source§

impl Add<i16> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i16) -> Expr

Performs the + operation. Read more
Source§

impl Add<i32> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i32) -> Expr

Performs the + operation. Read more
Source§

impl Add<i64> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i64) -> Expr

Performs the + operation. Read more
Source§

impl Add<i8> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: i8) -> Expr

Performs the + operation. Read more
Source§

impl Add<isize> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: isize) -> Expr

Performs the + operation. Read more
Source§

impl Add<u16> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u16) -> Expr

Performs the + operation. Read more
Source§

impl Add<u32> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u32) -> Expr

Performs the + operation. Read more
Source§

impl Add<u64> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u64) -> Expr

Performs the + operation. Read more
Source§

impl Add<u8> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u8) -> Expr

Performs the + operation. Read more
Source§

impl Add<usize> for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: usize) -> Expr

Performs the + operation. Read more
Source§

impl Add for Var

Source§

type Output = Expr

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Expr

Performs the + operation. Read more
Source§

impl AttachModel for Var

Source§

fn attach<'a>(&'a self, model: &'a Model) -> Attached<'a, Self>
where Self: Sized,

Attach a model reference to this object for formatting with Debug
Source§

impl Clone for Var

Source§

fn clone(&self) -> Var

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Var

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Var> for Expr

Source§

fn from(var: Var) -> Expr

Converts to this type from the input type.
Source§

impl Hash for Var

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl ModelObject for Var

Source§

fn id(&self) -> u32

Retrieve the object’s ID.
Source§

impl Mul<Var> for f32

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<Var> for f64

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<Var> for i16

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<Var> for i32

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<Var> for i64

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<Var> for i8

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<Var> for isize

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<Var> for u16

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<Var> for u32

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<Var> for u64

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<Var> for u8

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<Var> for usize

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Var) -> Expr

Performs the * operation. Read more
Source§

impl Mul<f32> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f32) -> Expr

Performs the * operation. Read more
Source§

impl Mul<f64> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f64) -> Expr

Performs the * operation. Read more
Source§

impl Mul<i16> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i16) -> Expr

Performs the * operation. Read more
Source§

impl Mul<i32> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i32) -> Expr

Performs the * operation. Read more
Source§

impl Mul<i64> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i64) -> Expr

Performs the * operation. Read more
Source§

impl Mul<i8> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: i8) -> Expr

Performs the * operation. Read more
Source§

impl Mul<isize> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: isize) -> Expr

Performs the * operation. Read more
Source§

impl Mul<u16> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u16) -> Expr

Performs the * operation. Read more
Source§

impl Mul<u32> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u32) -> Expr

Performs the * operation. Read more
Source§

impl Mul<u64> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u64) -> Expr

Performs the * operation. Read more
Source§

impl Mul<u8> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u8) -> Expr

Performs the * operation. Read more
Source§

impl Mul<usize> for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: usize) -> Expr

Performs the * operation. Read more
Source§

impl Mul for Var

Source§

type Output = Expr

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Expr

Performs the * operation. Read more
Source§

impl Neg for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn neg(self) -> Expr

Performs the unary - operation. Read more
Source§

impl ObjAttrGet<Var, VarType> for VarVTypeAttr

Source§

fn get(&self, model: &Model, idx: i32) -> Result<VarType>

Get the value for this attribute
Source§

fn get_batch<I: IntoIterator<Item = Result<i32>>>( &self, model: &Model, inds: I, ) -> Result<Vec<VarType>>

Get multiple values for this attribute at once
Source§

impl ObjAttrSet<Var, VarType> for VarVTypeAttr

Source§

fn set(&self, model: &Model, idx: i32, val: VarType) -> Result<()>

Set the value for this attribute
Source§

fn set_batch<I: IntoIterator<Item = (Result<i32>, VarType)>>( &self, model: &Model, idx_val_pairs: I, ) -> Result<()>

Set multiple values for this attribute at once
Source§

impl ObjAttrSet<Var, u8> for VarVTypeAttr

Source§

fn set(&self, model: &Model, idx: i32, val: c_char) -> Result<()>

Set the value for this attribute
Source§

fn set_batch<I: IntoIterator<Item = (Result<i32>, c_char)>>( &self, model: &Model, idx_val_pairs: I, ) -> Result<()>

Set multiple values for this attribute at once
Source§

impl PartialEq for Var

Source§

fn eq(&self, other: &Var) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Sub<Expr> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Expr) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for Expr

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for f32

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for f64

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for i16

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for i32

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for i64

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for i8

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for isize

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for u16

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for u32

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for u64

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for u8

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<Var> for usize

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Var) -> Expr

Performs the - operation. Read more
Source§

impl Sub<f32> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: f32) -> Expr

Performs the - operation. Read more
Source§

impl Sub<f64> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: f64) -> Expr

Performs the - operation. Read more
Source§

impl Sub<i16> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i16) -> Expr

Performs the - operation. Read more
Source§

impl Sub<i32> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i32) -> Expr

Performs the - operation. Read more
Source§

impl Sub<i64> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i64) -> Expr

Performs the - operation. Read more
Source§

impl Sub<i8> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: i8) -> Expr

Performs the - operation. Read more
Source§

impl Sub<isize> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: isize) -> Expr

Performs the - operation. Read more
Source§

impl Sub<u16> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u16) -> Expr

Performs the - operation. Read more
Source§

impl Sub<u32> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u32) -> Expr

Performs the - operation. Read more
Source§

impl Sub<u64> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u64) -> Expr

Performs the - operation. Read more
Source§

impl Sub<u8> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u8) -> Expr

Performs the - operation. Read more
Source§

impl Sub<usize> for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: usize) -> Expr

Performs the - operation. Read more
Source§

impl Sub for Var

Source§

type Output = Expr

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Expr

Performs the - operation. Read more
Source§

impl Copy for Var

Source§

impl Eq for Var

Source§

impl StructuralPartialEq for Var

Auto Trait Implementations§

§

impl Freeze for Var

§

impl RefUnwindSafe for Var

§

impl Send for Var

§

impl Sync for Var

§

impl Unpin for Var

§

impl UnwindSafe for Var

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.