Struct gurobi::LinExpr [−][src]
pub struct LinExpr { /* fields omitted */ }
Linear expression of variables
A linear expression consists of a constant term plus a list of coefficients and variables.
Methods
impl LinExpr
[src]
impl LinExpr
pub fn new() -> Self
[src]
pub fn new() -> Self
Create an empty linear expression.
pub fn add_term(self, coeff: f64, var: Var) -> Self
[src]
pub fn add_term(self, coeff: f64, var: Var) -> Self
Add a linear term into the expression.
pub fn add_constant(self, constant: f64) -> Self
[src]
pub fn add_constant(self, constant: f64) -> Self
Add a constant into the expression.
pub fn get_value(&self, model: &Model) -> Result<f64>
[src]
pub fn get_value(&self, model: &Model) -> Result<f64>
Get actual value of the expression.
Trait Implementations
impl Debug for LinExpr
[src]
impl Debug for LinExpr
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for LinExpr
[src]
impl Clone for LinExpr
fn clone(&self) -> LinExpr
[src]
fn clone(&self) -> LinExpr
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for LinExpr
[src]
impl Default for LinExpr
impl<'a> From<&'a Var> for LinExpr
[src]
impl<'a> From<&'a Var> for LinExpr
impl From<Var> for LinExpr
[src]
impl From<Var> for LinExpr
impl From<f64> for LinExpr
[src]
impl From<f64> for LinExpr
impl Into<(Vec<i32>, Vec<f64>, f64)> for LinExpr
[src]
impl Into<(Vec<i32>, Vec<f64>, f64)> for LinExpr
impl Into<QuadExpr> for LinExpr
[src]
impl Into<QuadExpr> for LinExpr
impl Sub<LinExpr> for Var
[src]
impl Sub<LinExpr> for Var
type Output = LinExpr
The resulting type after applying the -
operator.
fn sub(self, expr: LinExpr) -> LinExpr
[src]
fn sub(self, expr: LinExpr) -> LinExpr
Performs the -
operation.
impl<'a> Sub<LinExpr> for &'a Var
[src]
impl<'a> Sub<LinExpr> for &'a Var
type Output = LinExpr
The resulting type after applying the -
operator.
fn sub(self, expr: LinExpr) -> LinExpr
[src]
fn sub(self, expr: LinExpr) -> LinExpr
Performs the -
operation.
impl Add<LinExpr> for Var
[src]
impl Add<LinExpr> for Var
LinExpr
+ Var
=> LinExpr
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: LinExpr) -> LinExpr
[src]
fn add(self, rhs: LinExpr) -> LinExpr
Performs the +
operation.
impl<'a> Add<LinExpr> for &'a Var
[src]
impl<'a> Add<LinExpr> for &'a Var
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: LinExpr) -> LinExpr
[src]
fn add(self, rhs: LinExpr) -> LinExpr
Performs the +
operation.
impl Add<Var> for LinExpr
[src]
impl Add<Var> for LinExpr
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: Var) -> LinExpr
[src]
fn add(self, rhs: Var) -> LinExpr
Performs the +
operation.
impl<'a> Add<&'a Var> for LinExpr
[src]
impl<'a> Add<&'a Var> for LinExpr
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: &'a Var) -> LinExpr
[src]
fn add(self, rhs: &'a Var) -> LinExpr
Performs the +
operation.
impl Add<f64> for LinExpr
[src]
impl Add<f64> for LinExpr
LinExpr
+ f64
=> LinExpr
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: f64) -> Self::Output
[src]
fn add(self, rhs: f64) -> Self::Output
Performs the +
operation.
impl Add<LinExpr> for f64
[src]
impl Add<LinExpr> for f64
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: LinExpr) -> Self::Output
[src]
fn add(self, rhs: LinExpr) -> Self::Output
Performs the +
operation.
impl Sub<f64> for LinExpr
[src]
impl Sub<f64> for LinExpr
LinExpr
- f64
=> LinExpr
type Output = LinExpr
The resulting type after applying the -
operator.
fn sub(self, rhs: f64) -> Self::Output
[src]
fn sub(self, rhs: f64) -> Self::Output
Performs the -
operation.
impl Sub<LinExpr> for f64
[src]
impl Sub<LinExpr> for f64
f64
- LinExpr
=> LinExpr
type Output = LinExpr
The resulting type after applying the -
operator.
fn sub(self, rhs: LinExpr) -> Self::Output
[src]
fn sub(self, rhs: LinExpr) -> Self::Output
Performs the -
operation.
impl Add for LinExpr
[src]
impl Add for LinExpr
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: LinExpr) -> Self::Output
[src]
fn add(self, rhs: LinExpr) -> Self::Output
Performs the +
operation.
impl Neg for LinExpr
[src]
impl Neg for LinExpr
type Output = LinExpr
The resulting type after applying the -
operator.
fn neg(self) -> LinExpr
[src]
fn neg(self) -> LinExpr
Performs the unary -
operation.
impl AddAssign for LinExpr
[src]
impl AddAssign for LinExpr
fn add_assign(&mut self, rhs: LinExpr)
[src]
fn add_assign(&mut self, rhs: LinExpr)
Performs the +=
operation.
impl AddAssign<Var> for LinExpr
[src]
impl AddAssign<Var> for LinExpr
fn add_assign(&mut self, rhs: Var)
[src]
fn add_assign(&mut self, rhs: Var)
Performs the +=
operation.
impl Sub for LinExpr
[src]
impl Sub for LinExpr
type Output = LinExpr
The resulting type after applying the -
operator.
fn sub(self, rhs: LinExpr) -> Self::Output
[src]
fn sub(self, rhs: LinExpr) -> Self::Output
Performs the -
operation.
impl Mul<f64> for LinExpr
[src]
impl Mul<f64> for LinExpr
type Output = LinExpr
The resulting type after applying the *
operator.
fn mul(self, rhs: f64) -> Self::Output
[src]
fn mul(self, rhs: f64) -> Self::Output
Performs the *
operation.
impl Div<f64> for LinExpr
[src]
impl Div<f64> for LinExpr
type Output = LinExpr
The resulting type after applying the /
operator.
fn div(self, rhs: f64) -> Self::Output
[src]
fn div(self, rhs: f64) -> Self::Output
Performs the /
operation.
impl Mul<LinExpr> for f64
[src]
impl Mul<LinExpr> for f64
type Output = LinExpr
The resulting type after applying the *
operator.
fn mul(self, rhs: LinExpr) -> Self::Output
[src]
fn mul(self, rhs: LinExpr) -> Self::Output
Performs the *
operation.
impl Sum for LinExpr
[src]
impl Sum for LinExpr
fn sum<I: Iterator<Item = LinExpr>>(iter: I) -> LinExpr
[src]
fn sum<I: Iterator<Item = LinExpr>>(iter: I) -> LinExpr
Method which takes an iterator and generates Self
from the elements by "summing up" the items. Read more
impl Add<LinExpr> for QuadExpr
[src]
impl Add<LinExpr> for QuadExpr
type Output = QuadExpr
The resulting type after applying the +
operator.
fn add(self, rhs: LinExpr) -> Self::Output
[src]
fn add(self, rhs: LinExpr) -> Self::Output
Performs the +
operation.
impl Sub<LinExpr> for QuadExpr
[src]
impl Sub<LinExpr> for QuadExpr