pub struct SparseXtwxPrecomputed {
pub xtwx_symbolic_col_ptr: Vec<usize>,
pub xtwx_symbolic_row_idx: Vec<usize>,
pub xtwxvalues: Vec<f64>,
}Expand description
Precomputed numerical values of XᵀWX aligned with the symbolic pattern
that SparseXtWxCache::new(x) produces on its first call. Two such caches
built from the same sparse x produce byte-identical symbolic patterns
(faer’s sparse_sparse_matmul_symbolic is deterministic), so the cached
values can be installed back into a fresh SparseXtWxCache for the same
x without rerunning the SpGEMM.
We snapshot the symbolic pattern (col_ptr / row_idx) alongside the
values so the consumer can verify pattern equivalence and fall through to
the per-call recomputation if anything diverges (e.g. an x with a
different symbolic shape sneaks in).
Fields§
§xtwx_symbolic_col_ptr: Vec<usize>§xtwx_symbolic_row_idx: Vec<usize>§xtwxvalues: Vec<f64>Implementations§
Source§impl SparseXtwxPrecomputed
impl SparseXtwxPrecomputed
Sourcepub fn build(
x: &SparseColMat<usize, f64>,
weights: &Array1<f64>,
) -> Result<Self, EstimationError>
pub fn build( x: &SparseColMat<usize, f64>, weights: &Array1<f64>, ) -> Result<Self, EstimationError>
Build the precomputed XᵀWX value layout for x at the given
weights. The output reuses the same construction path the inner
PIRLS workspace uses, so it lands in exactly the symbolic pattern
the consumer expects.
Trait Implementations§
Source§impl Clone for SparseXtwxPrecomputed
impl Clone for SparseXtwxPrecomputed
Source§fn clone(&self) -> SparseXtwxPrecomputed
fn clone(&self) -> SparseXtwxPrecomputed
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 SparseXtwxPrecomputed
impl RefUnwindSafe for SparseXtwxPrecomputed
impl Send for SparseXtwxPrecomputed
impl Sync for SparseXtwxPrecomputed
impl Unpin for SparseXtwxPrecomputed
impl UnsafeUnpin for SparseXtwxPrecomputed
impl UnwindSafe for SparseXtwxPrecomputed
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.