pub struct DefinedVar {
pub nl_index: u32,
pub linear: Vec<(u32, f64)>,
pub appearance: u32,
pub nonlinear_polish: String,
}Expand description
One V segment: a defined variable holding a named common subexpression.
Fields§
§nl_index: u32The NL variable index this defined var occupies. Must be >= n_var
(real decision variables come first).
linear: Vec<(u32, f64)>Linear part sum(coef_i * v_i) (referencing other NL indices).
appearance: u32Which constraint or objective this defined var is private to:
0 -> shared (appears in V block at the top, before C/L/O),
m+1 -> only in constraint m, n_con + n_lcon + m -> only in
objective m.
nonlinear_polish: StringPolish-prefix expression text for the nonlinear part (e.g. "o5\nv0\nn2\n").
"" means a purely-linear defined var (the expression part collapses
to a single n0 constant when emitted).
Trait Implementations§
Source§impl Clone for DefinedVar
impl Clone for DefinedVar
Source§fn clone(&self) -> DefinedVar
fn clone(&self) -> DefinedVar
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DefinedVar
impl RefUnwindSafe for DefinedVar
impl Send for DefinedVar
impl Sync for DefinedVar
impl Unpin for DefinedVar
impl UnsafeUnpin for DefinedVar
impl UnwindSafe for DefinedVar
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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