[][src]Struct gurobi::Var

pub struct Var(_);

Proxy object of a variables

Methods

impl Var[src]

pub fn get_type(&self, model: &Model) -> Result<(char, f64, f64)>[src]

Returns the variable type, lower bound and upper bound in that order.

Variable type is 'C' for continuous, 'B' for binary, 'I' for integer, 'S' for semi-continuous, or 'N' for semi-integer.

Methods from Deref<Target = Proxy>

pub fn index(&self) -> i32[src]

pub fn get<A: AttrArray>(&self, model: &Model, attr: A) -> Result<A::Out>[src]

Query the value of attribute.

pub fn set<A: AttrArray>(
    &self,
    model: &mut Model,
    attr: A,
    val: A::Out
) -> Result<()>
[src]

Set the value of attribute.

pub fn remove(&mut self)[src]

Trait Implementations

impl<'a> Add<&'a Var> for Var[src]

type Output = LinExpr

The resulting type after applying the + operator.

impl<'a> Add<&'a Var> for LinExpr[src]

type Output = LinExpr

The resulting type after applying the + operator.

impl<'a, 'b> Add<&'b Var> for &'a Var[src]

type Output = LinExpr

The resulting type after applying the + operator.

impl Add<LinExpr> for Var[src]

LinExpr + Var => LinExpr

type Output = LinExpr

The resulting type after applying the + operator.

impl<'a> Add<LinExpr> for &'a Var[src]

type Output = LinExpr

The resulting type after applying the + operator.

impl Add<Var> for Var[src]

Var + Var => LinExpr

type Output = LinExpr

The resulting type after applying the + operator.

impl<'a> Add<Var> for &'a Var[src]

type Output = LinExpr

The resulting type after applying the + operator.

impl Add<Var> for LinExpr[src]

type Output = LinExpr

The resulting type after applying the + operator.

impl Add<f64> for Var[src]

type Output = LinExpr

The resulting type after applying the + operator.

impl<'a> Add<f64> for &'a Var[src]

type Output = LinExpr

The resulting type after applying the + operator.

impl AddAssign<Var> for LinExpr[src]

impl Clone for Var[src]

impl Debug for Var[src]

impl Deref for Var[src]

type Target = Proxy

The resulting type after dereferencing.

impl DerefMut for Var[src]

impl<'a> From<&'a Var> for LinExpr[src]

impl From<Var> for LinExpr[src]

impl Into<QuadExpr> for Var[src]

impl<'a> Into<QuadExpr> for &'a Var[src]

impl<'a> Mul<&'a Var> for f64[src]

type Output = LinExpr

The resulting type after applying the * operator.

impl<'a> Mul<&'a Var> for Var[src]

type Output = QuadExpr

The resulting type after applying the * operator.

impl<'a, 'b> Mul<&'b Var> for &'a Var[src]

type Output = QuadExpr

The resulting type after applying the * operator.

impl Mul<Var> for f64[src]

type Output = LinExpr

The resulting type after applying the * operator.

impl Mul<Var> for Var[src]

Var * Var => QuadExpr

type Output = QuadExpr

The resulting type after applying the * operator.

impl<'a> Mul<Var> for &'a Var[src]

type Output = QuadExpr

The resulting type after applying the * operator.

impl Mul<f64> for Var[src]

Var * f64 => LinExpr

type Output = LinExpr

The resulting type after applying the * operator.

impl<'a> Mul<f64> for &'a Var[src]

type Output = LinExpr

The resulting type after applying the * operator.

impl Neg for Var[src]

-Var => LinExpr

type Output = LinExpr

The resulting type after applying the - operator.

impl<'a> Neg for &'a Var[src]

type Output = LinExpr

The resulting type after applying the - operator.

impl PartialEq<Var> for Var[src]

impl<'a> Sub<&'a Var> for Var[src]

type Output = LinExpr

The resulting type after applying the - operator.

impl<'a> Sub<&'a Var> for f64[src]

type Output = LinExpr

The resulting type after applying the - operator.

impl<'a, 'b> Sub<&'b Var> for &'a Var[src]

type Output = LinExpr

The resulting type after applying the - operator.

impl Sub<LinExpr> for Var[src]

type Output = LinExpr

The resulting type after applying the - operator.

impl<'a> Sub<LinExpr> for &'a Var[src]

type Output = LinExpr

The resulting type after applying the - operator.

impl Sub<Var> for Var[src]

Var - Var => LinExpr

type Output = LinExpr

The resulting type after applying the - operator.

impl<'a> Sub<Var> for &'a Var[src]

type Output = LinExpr

The resulting type after applying the - operator.

impl Sub<Var> for f64[src]

type Output = LinExpr

The resulting type after applying the - operator.

Auto Trait Implementations

impl !RefUnwindSafe for Var

impl !Send for Var

impl !Sync for Var

impl Unpin for Var

impl !UnwindSafe for Var

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.