Struct good_lp::variable::Variable [−][src]
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.
fn add(self, rhs: RHS) -> Self::Output
[src]
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.
fn div(self, rhs: f64) -> Self::Output
[src]
impl Div<i32> for Variable
[src]
type Output = Expression
The resulting type after applying the /
operator.
fn div(self, rhs: i32) -> Self::Output
[src]
impl Eq for Variable
[src]
impl<'a> From<&'a Variable> for Expression
[src]
impl From<Variable> for Expression
[src]
impl Hash for Variable
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<N: Into<f64>> Mul<N> for Variable
[src]
type Output = Expression
The resulting type after applying the *
operator.
fn mul(self, rhs: N) -> Self::Output
[src]
impl Neg for Variable
[src]
type Output = Expression
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl PartialEq<Variable> for Variable
[src]
impl<RHS> Shl<RHS> for Variable where
Self: Sub<RHS, Output = Expression>,
[src]
Self: Sub<RHS, Output = Expression>,
type Output = Constraint
The resulting type after applying the <<
operator.
fn shl(self, rhs: RHS) -> Self::Output
[src]
impl<RHS: Sub<Self, Output = Expression>> Shr<RHS> for Variable
[src]
type Output = Constraint
The resulting type after applying the >>
operator.
fn shr(self, rhs: RHS) -> Self::Output
[src]
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.
fn sub(self, rhs: RHS) -> Self::Output
[src]
Auto Trait Implementations
impl RefUnwindSafe for Variable
[src]
impl Send for Variable
[src]
impl Sync for Variable
[src]
impl Unpin for Variable
[src]
impl UnwindSafe for Variable
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,