Trait good_lp::IntoAffineExpression[][src]

pub trait IntoAffineExpression {
    type Iter: IntoIterator<Item = (Variable, f64)>;
    fn linear_coefficients(self) -> Self::Iter;

    fn constant(&self) -> f64 { ... }
}

An element that can be expressed as a linear combination of variables plus a constant

Associated Types

type Iter: IntoIterator<Item = (Variable, f64)>[src]

The iterator returned by linear_coefficients.

Loading content...

Required methods

fn linear_coefficients(self) -> Self::Iter[src]

An iterator over variables and their coefficients. For instance a + 2b - 3a - 7 should yield [(a, -2), (b, 2)]

Loading content...

Provided methods

fn constant(&self) -> f64[src]

The constant factor in the expression. For instance, a + 2b - 7 will give -7

Loading content...

Implementations on Foreign Types

impl IntoAffineExpression for f64[src]

type Iter = Empty<(Variable, f64)>

impl IntoAffineExpression for f32[src]

type Iter = Empty<(Variable, f64)>

impl IntoAffineExpression for u32[src]

type Iter = Empty<(Variable, f64)>

impl IntoAffineExpression for u16[src]

type Iter = Empty<(Variable, f64)>

impl IntoAffineExpression for u8[src]

type Iter = Empty<(Variable, f64)>

impl IntoAffineExpression for i32[src]

type Iter = Empty<(Variable, f64)>

impl IntoAffineExpression for i16[src]

type Iter = Empty<(Variable, f64)>

impl IntoAffineExpression for i8[src]

type Iter = Empty<(Variable, f64)>

Loading content...

Implementors

impl IntoAffineExpression for Expression[src]

type Iter = <LinearExpression as IntoAffineExpression>::Iter

impl IntoAffineExpression for Variable[src]

type Iter = Once<(Self, f64)>

impl<'a> IntoAffineExpression for &'a Expression[src]

This implementation copies all the variables and coefficients from the referenced Expression into the created iterator

type Iter = <&'a LinearExpression as IntoAffineExpression>::Iter

impl<'a> IntoAffineExpression for &'a Variable[src]

Loading content...