Struct gurobi::QuadExpr
[−]
[src]
pub struct QuadExpr { // some fields omitted }
Quadratic expression of variables
A quadratic expression consists of a linear expression and a set of variable-variable-coefficient triples to express the quadratic term.
Methods
impl QuadExpr
[src]
fn new() -> Self
fn add_term(self, coeff: f64, var: Var) -> Self
Add a linear term into the expression.
fn add_qterm(self, coeff: f64, row: Var, col: Var) -> Self
Add a quadratic 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 QuadExpr
[src]
fn clone(&self) -> QuadExpr
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 Mul<f64> for QuadExpr
[src]
type Output = QuadExpr
The resulting type after applying the *
operator
fn mul(self, rhs: f64) -> Self::Output
The method for the *
operator
impl Add<LinExpr> for QuadExpr
[src]
type Output = QuadExpr
The resulting type after applying the +
operator
fn add(self, rhs: LinExpr) -> Self::Output
The method for the +
operator
impl Sub<LinExpr> for QuadExpr
[src]
type Output = QuadExpr
The resulting type after applying the -
operator
fn sub(self, rhs: LinExpr) -> Self::Output
The method for the -
operator
impl Add for QuadExpr
[src]
type Output = QuadExpr
The resulting type after applying the +
operator
fn add(self, rhs: QuadExpr) -> QuadExpr
The method for the +
operator