[][src]Struct minilp::LinearExpr

pub struct LinearExpr { /* fields omitted */ }

A sum of variables multiplied by constant coefficients used as a left-hand side when defining constraints.

Implementations

impl LinearExpr[src]

pub fn empty() -> Self[src]

Creates an empty linear expression.

pub fn add(&mut self, var: Variable, coeff: f64)[src]

Add a single term to the linear expression.

Variables can be added to an expression in any order, but adding the same variable several times is forbidden (the Problem::add_constraint method will panic).

Trait Implementations

impl Clone for LinearExpr[src]

impl Debug for LinearExpr[src]

impl Extend<(Variable, f64)> for LinearExpr[src]

impl<I: IntoIterator<Item = impl Into<LinearTerm>>> From<I> for LinearExpr[src]

impl FromIterator<(Variable, f64)> for LinearExpr[src]

Auto Trait Implementations

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.