Struct gurobi::LinExpr
[−]
[src]
pub struct LinExpr {
// some 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]
fn new() -> Self
Create an empty linear expression.
fn add_term(self, coeff: f64, var: Var) -> Self
Add a linear term into the expression.
fn add_constant(self, constant: f64) -> Self
Add a constant into the expression.
fn get_value(&self, model: &Model) -> Result<f64>
Get actual value of the expression.
Trait Implementations
impl Clone for LinExpr[src]
fn clone(&self) -> LinExpr
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Debug for LinExpr[src]
impl Into<(Vec<i32>, Vec<f64>, f64)> for LinExpr[src]
impl Into<QuadExpr> for LinExpr[src]
impl Add<Var> for LinExpr[src]
type Output = LinExpr
The resulting type after applying the + operator
fn add(self, rhs: Var) -> LinExpr
The method for the + operator
impl<'a> Add<&'a Var> for LinExpr[src]
type Output = LinExpr
The resulting type after applying the + operator
fn add(self, rhs: &'a Var) -> LinExpr
The method for the + operator
impl Add<f64> for LinExpr[src]
type Output = LinExpr
The resulting type after applying the + operator
fn add(self, rhs: f64) -> Self::Output
The method for the + operator
impl Sub<f64> for LinExpr[src]
type Output = LinExpr
The resulting type after applying the - operator
fn sub(self, rhs: f64) -> Self::Output
The method for the - operator
impl Add for LinExpr[src]
type Output = LinExpr
The resulting type after applying the + operator
fn add(self, rhs: LinExpr) -> Self::Output
The method for the + operator