pub struct Regularization<T: Real = f64> {
pub primal: T,
pub dual: T,
pub pivot_tol: Option<T>,
pub bump: T,
pub scale: ShiftScale,
}Expand description
Regularization of a quasi-definite KKT matrix (Altman & Gondzio 1999; Algorithm K).
Fields§
§primal: Tρ ≥ 0, added to the primal block (which becomes −D − ρI, in
the units Regularization::scale says); ignored for the normal
equations.
dual: Tδ ≥ 0, added to the dual block (δI), or to the whole diagonal
of the normal equations (A D Aᵀ + δI), in the units
Regularization::scale says.
pivot_tol: Option<T>Below this magnitude (or with the wrong sign) a pivot of the
equilibrated matrix is bumped to ±bump with the sign the inertia
expects (dynamic regularization, step K3); None disables it.
bump: TThe magnitude β > 0 of a bumped pivot (of the equilibrated
matrix).
scale: ShiftScaleWhether ρ, δ are taken in the equilibrated matrix (the default)
or in K itself (step K2″).
Implementations§
Source§impl<T: Real> Regularization<T>
impl<T: Real> Regularization<T>
Sourcepub fn none() -> Self
pub fn none() -> Self
No regularization at all: ρ = δ = 0, no bumping (the factorization
then fails on a zero pivot, or with the wrong inertia).
Sourcepub fn relative_to(k: &CscMatrix<T>, factor: T) -> Self
pub fn relative_to(k: &CscMatrix<T>, factor: T) -> Self
Absolute static shifts relative to the largest entry of k:
ρ = δ = factor · max|k_ij| with ShiftScale::Absolute, and the
dynamic part of Regularization::default (the L1.5 variant).
One shift for the whole matrix: at the end of an interior-point
method, where max|k_ij| ≈ 10^{10}, factor = 10⁻⁸ gives
δ ≈ 10², a large perturbation of the rows of small magnitude —
refinement against the unregularized K then converges slowly
(Chapter 5.14, “Choosing the regularization”). The default
(ShiftScale::Equilibrated) is relative row by row instead.
Sourcepub fn is_quasi_definite(&self) -> bool
pub fn is_quasi_definite(&self) -> bool
ρ > 0 and δ > 0: the regularized augmented matrix is
quasi-definite (it factorizes without pivoting, in any order).
Trait Implementations§
impl<T: Copy + Real> Copy for Regularization<T>
Source§impl<T: Real> Default for Regularization<T>
impl<T: Real> Default for Regularization<T>
Source§fn default() -> Self
fn default() -> Self
ρ = 10⁻⁶, δ = 10⁻⁸ in the equilibrated matrix
(ShiftScale::Equilibrated: relative to each row), and pivots of
the wrong sign or of magnitude at most τ = 10⁻¹³ bumped to
±β = ±2·10⁻⁷. ρδ = 10⁻¹⁴, about 50 units of roundoff, keeps the
regularized augmented matrix numerically quasi-definite; δ
alone, small, is what the normal equations see (Chapter 5.14,
“Choosing the regularization”, measured in L1.5b). τ, β are of
the order of the defaults of current interior-point codes
(Clarabel’s documented dynamic regularization; not tuned here).