Trait good_lp::IntoAffineExpression [−][src]
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
.
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)]
Provided methods
fn constant(&self) -> f64
[src]
The constant factor in the expression.
For instance, a + 2b - 7
will give -7
Implementations on Foreign Types
impl IntoAffineExpression for f64
[src]
type Iter = Empty<(Variable, f64)>
fn linear_coefficients(self) -> Self::Iter
[src]
fn constant(&self) -> f64
[src]
impl IntoAffineExpression for f32
[src]
type Iter = Empty<(Variable, f64)>
fn linear_coefficients(self) -> Self::Iter
[src]
fn constant(&self) -> f64
[src]
impl IntoAffineExpression for u32
[src]
type Iter = Empty<(Variable, f64)>
fn linear_coefficients(self) -> Self::Iter
[src]
fn constant(&self) -> f64
[src]
impl IntoAffineExpression for u16
[src]
type Iter = Empty<(Variable, f64)>
fn linear_coefficients(self) -> Self::Iter
[src]
fn constant(&self) -> f64
[src]
impl IntoAffineExpression for u8
[src]
type Iter = Empty<(Variable, f64)>
fn linear_coefficients(self) -> Self::Iter
[src]
fn constant(&self) -> f64
[src]
impl IntoAffineExpression for i32
[src]
type Iter = Empty<(Variable, f64)>
fn linear_coefficients(self) -> Self::Iter
[src]
fn constant(&self) -> f64
[src]
impl IntoAffineExpression for i16
[src]
type Iter = Empty<(Variable, f64)>
fn linear_coefficients(self) -> Self::Iter
[src]
fn constant(&self) -> f64
[src]
impl IntoAffineExpression for i8
[src]
type Iter = Empty<(Variable, f64)>
fn linear_coefficients(self) -> Self::Iter
[src]
fn constant(&self) -> f64
[src]
Implementors
impl IntoAffineExpression for Expression
[src]
type Iter = <LinearExpression as IntoAffineExpression>::Iter
fn linear_coefficients(self) -> Self::Iter
[src]
fn constant(&self) -> f64
[src]
impl IntoAffineExpression for Variable
[src]
impl<'a> IntoAffineExpression for &'a Expression
[src]
This implementation copies all the variables and coefficients from the referenced Expression into the created iterator