[−][src]Struct gurobi::LinExpr
Linear expression of variables
A linear expression consists of a constant term plus a list of coefficients and variables.
Methods
impl LinExpr
[src]
pub fn new() -> Self
[src]
Create an empty linear expression.
pub fn add_term(self, coeff: f64, var: Var) -> Self
[src]
Add a linear term into the expression.
pub fn add_terms(self, coeffs: &[f64], vars: &[Var]) -> Self
[src]
Add linear terms into the expression. Panics if the lengths do not match.
pub fn add_constant(self, constant: f64) -> Self
[src]
Add a constant into the expression.
pub fn get_value(&self, model: &Model) -> Result<f64>
[src]
Get actual value of the expression.
Trait Implementations
impl<'a> Add<&'a Var> for LinExpr
[src]
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: &'a Var) -> LinExpr
[src]
impl Add<LinExpr> for Var
[src]
LinExpr
+ Var
=> LinExpr
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: LinExpr) -> LinExpr
[src]
impl<'a> Add<LinExpr> for &'a Var
[src]
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: LinExpr) -> LinExpr
[src]
impl Add<LinExpr> for f64
[src]
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: LinExpr) -> Self::Output
[src]
impl Add<LinExpr> for LinExpr
[src]
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: LinExpr) -> Self::Output
[src]
impl Add<LinExpr> for QuadExpr
[src]
type Output = QuadExpr
The resulting type after applying the +
operator.
fn add(self, rhs: LinExpr) -> Self::Output
[src]
impl Add<Var> for LinExpr
[src]
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: Var) -> LinExpr
[src]
impl Add<f64> for LinExpr
[src]
LinExpr
+ f64
=> LinExpr
type Output = LinExpr
The resulting type after applying the +
operator.
fn add(self, rhs: f64) -> Self::Output
[src]
impl AddAssign<LinExpr> for LinExpr
[src]
fn add_assign(&mut self, rhs: LinExpr)
[src]
impl AddAssign<Var> for LinExpr
[src]
fn add_assign(&mut self, rhs: Var)
[src]
impl Clone for LinExpr
[src]
impl Debug for LinExpr
[src]
impl Default for LinExpr
[src]
impl Div<f64> for LinExpr
[src]
type Output = LinExpr
The resulting type after applying the /
operator.
fn div(self, rhs: f64) -> Self::Output
[src]
impl<'a> From<&'a Var> for LinExpr
[src]
impl From<Var> for LinExpr
[src]
impl From<f64> for LinExpr
[src]
impl Into<(Vec<i32>, Vec<f64>, f64)> for LinExpr
[src]
impl Into<QuadExpr> for LinExpr
[src]
impl Mul<LinExpr> for f64
[src]
type Output = LinExpr
The resulting type after applying the *
operator.
fn mul(self, rhs: LinExpr) -> Self::Output
[src]
impl Mul<f64> for LinExpr
[src]
type Output = LinExpr
The resulting type after applying the *
operator.
fn mul(self, rhs: f64) -> Self::Output
[src]
impl Neg for LinExpr
[src]
impl Sub<LinExpr> for Var
[src]
type Output = LinExpr
The resulting type after applying the -
operator.
fn sub(self, expr: LinExpr) -> LinExpr
[src]
impl<'a> Sub<LinExpr> for &'a Var
[src]
type Output = LinExpr
The resulting type after applying the -
operator.
fn sub(self, expr: LinExpr) -> LinExpr
[src]
impl Sub<LinExpr> for f64
[src]
f64
- LinExpr
=> LinExpr
type Output = LinExpr
The resulting type after applying the -
operator.
fn sub(self, rhs: LinExpr) -> Self::Output
[src]
impl Sub<LinExpr> for LinExpr
[src]
type Output = LinExpr
The resulting type after applying the -
operator.
fn sub(self, rhs: LinExpr) -> Self::Output
[src]
impl Sub<LinExpr> for QuadExpr
[src]
type Output = QuadExpr
The resulting type after applying the -
operator.
fn sub(self, rhs: LinExpr) -> Self::Output
[src]
impl Sub<f64> for LinExpr
[src]
LinExpr
- f64
=> LinExpr
type Output = LinExpr
The resulting type after applying the -
operator.
fn sub(self, rhs: f64) -> Self::Output
[src]
impl Sum<LinExpr> for LinExpr
[src]
Auto Trait Implementations
impl !RefUnwindSafe for LinExpr
impl !Send for LinExpr
impl !Sync for LinExpr
impl Unpin for LinExpr
impl !UnwindSafe for LinExpr
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,