[][src]Struct gurobi::QuadExpr

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]

pub fn new() -> Self[src]

pub fn add_term(self, coeff: f64, var: Var) -> Self[src]

Add a linear term into the expression.

pub fn add_qterm(self, coeff: f64, row: Var, col: Var) -> Self[src]

Add a quadratic term into the expression.

pub fn add_constant(self, constant: f64) -> Self[src]

Add a constant into the expression.

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

Get actual value of the expression.

Trait Implementations

impl Add<LinExpr> for QuadExpr[src]

type Output = QuadExpr

The resulting type after applying the + operator.

impl Add<QuadExpr> for QuadExpr[src]

type Output = QuadExpr

The resulting type after applying the + operator.

impl Clone for QuadExpr[src]

impl Debug for QuadExpr[src]

impl Default for QuadExpr[src]

impl Into<(Vec<i32>, Vec<f64>, Vec<i32>, Vec<i32>, Vec<f64>, f64)> for QuadExpr[src]

impl Into<QuadExpr> for Var[src]

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

impl Into<QuadExpr> for LinExpr[src]

impl Mul<f64> for QuadExpr[src]

type Output = QuadExpr

The resulting type after applying the * operator.

impl Sub<LinExpr> for QuadExpr[src]

type Output = QuadExpr

The resulting type after applying the - operator.

impl Sub<QuadExpr> for QuadExpr[src]

type Output = QuadExpr

The resulting type after applying the - operator.

Auto Trait Implementations

impl !RefUnwindSafe for QuadExpr

impl !Send for QuadExpr

impl !Sync for QuadExpr

impl Unpin for QuadExpr

impl !UnwindSafe for QuadExpr

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.