Struct good_lp::variable::Variable[][src]

pub struct Variable { /* fields omitted */ }

A variable in a problem. Use variables to create expressions, to express the objective and the Constraints of your model.

Variables are created using ProblemVariables::add

Warning

Eq is implemented on this type, but v1 == v2 is true only if the two variables represent the same object, not if they have the same definition.

let mut vars = variables!();
let v1 = vars.add(variable().min(1).max(8));
let v2 = vars.add(variable().min(1).max(8));
assert_ne!(v1, v2);

let v1_copy = v1;
assert_eq!(v1, v1_copy);

Trait Implementations

impl<RHS: IntoAffineExpression> Add<RHS> for Variable[src]

type Output = Expression

The resulting type after applying the + operator.

impl Clone for Variable[src]

impl Copy for Variable[src]

impl Debug for Variable[src]

impl Div<f64> for Variable[src]

type Output = Expression

The resulting type after applying the / operator.

impl Div<i32> for Variable[src]

type Output = Expression

The resulting type after applying the / operator.

impl Eq for Variable[src]

impl<'a> From<&'a Variable> for Expression[src]

impl From<Variable> for Expression[src]

impl Hash for Variable[src]

impl<N: Into<f64>> Mul<N> for Variable[src]

type Output = Expression

The resulting type after applying the * operator.

impl Neg for Variable[src]

type Output = Expression

The resulting type after applying the - operator.

impl PartialEq<Variable> for Variable[src]

impl<RHS> Shl<RHS> for Variable where
    Self: Sub<RHS, Output = Expression>, 
[src]

type Output = Constraint

The resulting type after applying the << operator.

impl<RHS: Sub<Self, Output = Expression>> Shr<RHS> for Variable[src]

type Output = Constraint

The resulting type after applying the >> operator.

impl StructuralEq for Variable[src]

impl StructuralPartialEq for Variable[src]

impl<RHS: IntoAffineExpression> Sub<RHS> for Variable[src]

type Output = Expression

The resulting type after applying the - operator.

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.