Skip to main content

Factors

Struct Factors 

Source
pub struct Factors {
    pub n: usize,
    pub l: Vec<f64>,
    pub d_diag: Vec<f64>,
    pub d_subdiag: Vec<f64>,
    pub perm: Vec<usize>,
    pub perm_inv: Vec<usize>,
    pub d_eq: Vec<f64>,
    pub needs_refinement: bool,
    pub zero_tol: f64,
    pub zero_tol_2x2: f64,
}
Expand description

Factorization result: P·L·D_bk·Lᵀ·Pᵀ = D_eq·A·D_eq.

Fields§

§n: usize§l: Vec<f64>

Unit lower triangular L in full n×n column-major storage. Diagonal entries are 1.0 (stored explicitly).

§d_diag: Vec<f64>

D_bk diagonal entries in pivot order. Length n.

§d_subdiag: Vec<f64>

D_bk sub-diagonal entries. Length n. Zero for 1×1 pivots.

§perm: Vec<usize>

BK pivot permutation (forward). Length n. perm[i] = j means original row j was moved to pivot position i.

§perm_inv: Vec<usize>

Inverse permutation. perm_inv[perm[i]] == i for all i.

§d_eq: Vec<f64>

Equilibration scaling diagonal D_eq. Length n.

§needs_refinement: bool

True when the factor is approximate and a residual check / iterative refinement is advised. Set by any of: a ForceAccept’d zero pivot, a PerturbToEps perturbation, an F-01 rank-deficiency band pivot (sign-fallback), an MA57-style static-pivot floor perturbation, or growth flagging (|L_ij| > L_GROWTH_THRESHOLD). (D9, repo-review-2026-06-09.md: previously documented as ForceAccept-only.)

§zero_tol: f64

1×1 pivot threshold copied from BunchKaufmanParams at factor time. solve consults this to decide whether to divide by d_diag[k]: pivots |d| <= zero_tol were force-accepted as numerically zero during factorization and must be skipped (left as-is) by the D-block solve. Otherwise dividing by a tiny pivot produces catastrophic error. See dev/plans/threshold-mismatch-fix.md.

§zero_tol_2x2: f64

2×2 pivot block threshold (matches BunchKaufmanParams::zero_tol_2x2).

Trait Implementations§

Source§

impl Debug for Factors

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.