pub struct OptimalCertificate { /* private fields */ }Expand description
KKT optimality certificate — all fields private, minted only by crate::qp::certificate::prove_optimal.
Construction is only possible via the pub(crate) new method called from
crate::qp::certificate::prove_optimal. External code cannot build this
struct directly, eliminating the “proof-less Optimal” anti-pattern.
Implementations§
Source§impl OptimalCertificate
impl OptimalCertificate
Sourcepub fn stationarity_rel(&self) -> f64
pub fn stationarity_rel(&self) -> f64
Componentwise relative stationarity: max_j |Qx+c+Aᵀy+z|_j / scale_j.
Sourcepub fn primal_residual_rel(&self) -> f64
pub fn primal_residual_rel(&self) -> f64
Componentwise relative primal violation: max_i viol_i / scale_i.
Sourcepub fn bound_violation(&self) -> f64
pub fn bound_violation(&self) -> f64
Primal bound violation: max_j max(lb_j−x_j, x_j−ub_j, 0) / scale_j.
Sourcepub fn complementarity_rel(&self) -> f64
pub fn complementarity_rel(&self) -> f64
Complementarity: max(|y_i · slack_i|, |z_j · (x_j−bnd_j)|) / normaliser.
Sourcepub fn dual_sign_violation(&self) -> f64
pub fn dual_sign_violation(&self) -> f64
Dual-sign violation: max_k viol_k / (1 + |v_k|) over sign-constrained duals.
Sourcepub fn duality_gap_rel(&self) -> f64
pub fn duality_gap_rel(&self) -> f64
Relative duality gap: |p_obj − d_obj| / max(|p|, |d|, 1).
Trait Implementations§
Source§impl Clone for OptimalCertificate
impl Clone for OptimalCertificate
Source§fn clone(&self) -> OptimalCertificate
fn clone(&self) -> OptimalCertificate
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 OptimalCertificate
impl RefUnwindSafe for OptimalCertificate
impl Send for OptimalCertificate
impl Sync for OptimalCertificate
impl Unpin for OptimalCertificate
impl UnsafeUnpin for OptimalCertificate
impl UnwindSafe for OptimalCertificate
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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