pub fn factorize(
kind: StepKind,
j: MatRef<'_, f64>,
diag: &[f64],
) -> Result<StepFactor, StepError>Expand description
Factor the step operator once for the current Jacobian and column scaling.
diag (D) is the per-iteration damping scale; for the SVD path it is baked
into the factorization (J̃ = J/D), for the NE path it is applied per λ.
§Errors
Returns StepError::Factorization when the StepKind::SvdSecular
thin SVD of the column-scaled Jacobian fails to converge. The
StepKind::NormalEqLlt path forms H = JᵀJ directly and cannot fail
here (its own Cholesky factorization happens later, per-λ, in
StepFactor::solve/StepFactor::solve_rhs).