pub struct Snapshot {
pub obj_costs: Vec<f64>,
pub obj_constant: f64,
pub lb: Vec<f64>,
pub ub: Vec<f64>,
pub fingerprint: u64,
}Expand description
Column-aligned snapshot of the quantities a persistent backend can push to a
resident model without rebuilding it (objective linear coefficients, the
objective constant, and variable bounds) plus a structural fingerprint of
everything it cannot push.
Two snapshots of the same model whose fingerprints match differ only in
pushable quantities, so a backend may update those in place and warm-start. A
fingerprint mismatch means the structure changed and the model must be rebuilt.
All vectors are indexed in Model::variables (column) order.
This is solver-agnostic, each backend’s persistent handle computes a baseline snapshot when it (re)builds and a fresh one on each re-solve, pushes the diffs its API supports, and rebuilds on a fingerprint mismatch.
Fields§
§obj_costs: Vec<f64>Objective linear coefficient per variable, in column order.
obj_constant: f64Constant term of the (linear) objective.
lb: Vec<f64>Lower bound per variable, in column order.
ub: Vec<f64>Upper bound per variable, in column order.
fingerprint: u64Hash of the structural parts that the fast path cannot push.
Trait Implementations§
impl StructuralPartialEq for Snapshot
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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
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>
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>
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