Struct grb::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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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 copy 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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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, i8> 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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Sub<Expr> for Var

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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> 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,

§

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>,

§

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>,

§

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.