pub struct ProjectedKktResidual { /* private fields */ }Expand description
KKT residual r = grad_beta L_pen(beta_hat) at the converged inner
iterate, tagged with the exact represented subspace.
Implementations§
Source§impl ProjectedKktResidual
impl ProjectedKktResidual
Sourcepub fn residual_tol(&self) -> Option<f64>
pub fn residual_tol(&self) -> Option<f64>
The KKT-stationarity tolerance the inner solver applied at the
producing iterate. Returns None when the residual was built
from a legacy site that hasn’t been threaded yet; downstream
consumers should substitute f64::NAN in that case.
Source§impl ProjectedKktResidual
impl ProjectedKktResidual
Sourcepub fn from_active_projected(residual: Array1<f64>) -> Self
pub fn from_active_projected(residual: Array1<f64>) -> Self
Construct from r_A = P_T(Sbeta + Gamma beta - grad ell), with active
constraint multipliers removed but before any reduced-range projection.
Sourcepub fn with_metadata(self, residual_tol: f64, free_rank: usize) -> Self
pub fn with_metadata(self, residual_tol: f64, free_rank: usize) -> Self
Attach the KKT tolerance and free-subspace rank to a previously constructed residual.
Sourcepub fn with_free_rank(self, free_rank: usize) -> Self
pub fn with_free_rank(self, free_rank: usize) -> Self
Attach the free-subspace rank alone, for producers that know which subspace they projected onto but have no inner-solver tolerance to report.
with_metadata demands both numbers, and the standard REML assembly
builders have only one: the active set is empty by construction there
(see the guards at both call sites), so free_rank is exactly the
coefficient count, while the inner solve exposes no KKT tolerance at
that seam. Before this existed those producers passed neither, and a
residual that does not record its own projection cannot be audited –
subspace=ActiveProjected free_rank=None says “some directions were
removed” without saying which or how many. Supplying a made-up
tolerance just to reach with_metadata would be worse: a number where
a measurement belongs.
Sourcepub fn as_array(&self) -> &Array1<f64>
pub fn as_array(&self) -> &Array1<f64>
Borrow the underlying free-space residual for the H^-1*r solve and its rho-derivatives.
pub fn subspace(&self) -> KktResidualSubspace
Sourcepub fn inf_norm(&self) -> f64
pub fn inf_norm(&self) -> f64
Sup-norm of the projected residual — the scalar a stationarity verdict is actually taken on. A refusal that reports only its cycle count cannot say whether the solve was one order from the tolerance or ten, and those have different causes; this is the number to put next to the count.
Trait Implementations§
Source§impl Clone for ProjectedKktResidual
impl Clone for ProjectedKktResidual
Source§fn clone(&self) -> ProjectedKktResidual
fn clone(&self) -> ProjectedKktResidual
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ProjectedKktResidual
impl RefUnwindSafe for ProjectedKktResidual
impl Send for ProjectedKktResidual
impl Sync for ProjectedKktResidual
impl Unpin for ProjectedKktResidual
impl UnsafeUnpin for ProjectedKktResidual
impl UnwindSafe for ProjectedKktResidual
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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,
impl<T, U> Imply<T> for U
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.