Struct gurobi::QuadExpr [−][src]
pub struct QuadExpr { /* 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]
impl QuadExpr
pub fn new() -> Self
[src]
pub fn new() -> Self
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_qterm(self, coeff: f64, row: Var, col: Var) -> Self
[src]
pub fn add_qterm(self, coeff: f64, row: Var, col: Var) -> Self
Add a quadratic 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 QuadExpr
[src]
impl Debug for QuadExpr
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 QuadExpr
[src]
impl Clone for QuadExpr
fn clone(&self) -> QuadExpr
[src]
fn clone(&self) -> QuadExpr
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 QuadExpr
[src]
impl Default for QuadExpr
impl Into<(Vec<i32>, Vec<f64>, Vec<i32>, Vec<i32>, Vec<f64>, f64)> for QuadExpr
[src]
impl Into<(Vec<i32>, Vec<f64>, Vec<i32>, Vec<i32>, Vec<f64>, f64)> for QuadExpr
fn into(self) -> (Vec<i32>, Vec<f64>, Vec<i32>, Vec<i32>, Vec<f64>, f64)
[src]
fn into(self) -> (Vec<i32>, Vec<f64>, Vec<i32>, Vec<i32>, Vec<f64>, f64)
Performs the conversion.
impl Into<QuadExpr> for Var
[src]
impl Into<QuadExpr> for Var
impl<'a> Into<QuadExpr> for &'a Var
[src]
impl<'a> Into<QuadExpr> for &'a Var
impl Into<QuadExpr> for LinExpr
[src]
impl Into<QuadExpr> for LinExpr
impl Mul<f64> for QuadExpr
[src]
impl Mul<f64> for QuadExpr
type Output = QuadExpr
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 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
type Output = QuadExpr
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 QuadExpr
[src]
impl Add for QuadExpr
type Output = QuadExpr
The resulting type after applying the +
operator.
fn add(self, rhs: QuadExpr) -> QuadExpr
[src]
fn add(self, rhs: QuadExpr) -> QuadExpr
Performs the +
operation.
impl Sub for QuadExpr
[src]
impl Sub for QuadExpr