pub struct IndexedVarBuilder<'a> { /* private fields */ }Implementations§
Source§impl<'a> IndexedVarBuilder<'a>
impl<'a> IndexedVarBuilder<'a>
pub fn lb(self, v: f64) -> Self
pub fn ub(self, v: f64) -> Self
pub fn bounds(self, lb: f64, ub: f64) -> Self
Sourcepub fn lb_by<K, F>(self, f: F) -> Self
pub fn lb_by<K, F>(self, f: F) -> Self
Per-key lower bound. Overrides Self::lb when both are set.
The closure receives a typed index value via FromIndexKey.
Annotate the argument to select the projection:
ⓘ
.lb_by(|(p, q): (String, String)| floor_for(&p, &q))
.lb_by(|i: usize| lower_bounds[i])Sourcepub fn ub_by<K, F>(self, f: F) -> Self
pub fn ub_by<K, F>(self, f: F) -> Self
Per-key upper bound. Overrides Self::ub when both are set.
The closure receives a typed index value via FromIndexKey; annotate
the argument to select the projection:
ⓘ
.ub_by(|(p, q): (String, String)| capacity_for(&p, &q))
.ub_by(|i: usize| upper_bounds[i])pub fn domain(self, d: Domain) -> Self
pub fn integer(self) -> Self
pub fn binary(self) -> Self
pub fn build(self) -> IndexedVar<'a>
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for IndexedVarBuilder<'a>
impl<'a> !Send for IndexedVarBuilder<'a>
impl<'a> !Sync for IndexedVarBuilder<'a>
impl<'a> !UnwindSafe for IndexedVarBuilder<'a>
impl<'a> Freeze for IndexedVarBuilder<'a>
impl<'a> Unpin for IndexedVarBuilder<'a>
impl<'a> UnsafeUnpin for IndexedVarBuilder<'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