pub struct VarBuilder<'a> { /* private fields */ }Expand description
Builder returned by Model::var. Configure bounds / domain, then call
Self::build to register the variable and obtain an Expr handle.
Implementations§
Source§impl<'a> VarBuilder<'a>
impl<'a> VarBuilder<'a>
pub fn lb(self, v: f64) -> Self
pub fn ub(self, v: f64) -> Self
pub fn bounds(self, lb: f64, ub: f64) -> Self
pub fn fix(self, value: f64) -> Self
pub fn domain(self, d: Domain) -> Self
pub fn integer(self) -> Self
pub fn binary(self) -> Self
pub fn initial(self, v: f64) -> Self
pub fn build(self) -> Expr<'a>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for VarBuilder<'a>
impl<'a> !RefUnwindSafe for VarBuilder<'a>
impl<'a> !Send for VarBuilder<'a>
impl<'a> !Sync for VarBuilder<'a>
impl<'a> Unpin for VarBuilder<'a>
impl<'a> UnsafeUnpin for VarBuilder<'a>
impl<'a> !UnwindSafe for VarBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more