pub struct IbpCrossRowSource {
pub r: usize,
pub d: Array1<f64>,
pub entries: Vec<(usize, usize, f64)>,
}Expand description
Exact cross-row low-rank IBP source (#1038): the per-column rank-one Hessian
terms H_(i,k),(j,k) = d_k·z'_ik·z'_jk (for ALL i,j, including the i=j
self term) that couple DISTINCT latent rows through a shared atom column k.
Stacking over rows, this is H_full = H₀' + U D Uᵀ, where:
Uisdelta_t_len × RwithU[g, k] = z'_ikat the global latent indexgof rowi’s logit slot for atomk(zero elsewhere) — i.e. columnkis supported on the atom-klogit slot of every row;D = diag(d_k),d_k = w·s'_k(gam_terms::analytic_penalties::IbpHessianDiagThirdChannels::cross_row_d);H₀'is the assembled latent block-diagonalH₀with the per-row self termd_k·z'_ik²REMOVED from each logit-slot diagonal (the assembledH₀already carries it, so the FULL rank-one outer productU D Uᵀ— which re-adds thei=jdiagonal — would double-count without this downdate). The determinant lemmalog det(I_R + D UᵀH₀'⁻¹U)is only the exact rank-Rcorrection against this no-self base.
The arrow elimination assumes each row’s H_tt^(i) is independent of every
other row, so it structurally cannot hold this coupling block-locally. The
factorization owner (solver::arrow_schur) consumes this source to (a)
downdate the per-row logit diagonal before factoring, (b) build U/D onto
the resulting ArrowFactorCache as a CrossRowWoodbury, and (c) apply
the exact Woodbury correction to the value/curvature solve, the evidence
log-determinant, and the θ/ρ-adjoint TOGETHER (they all describe the SAME
H_full).
Fields§
§r: usizeNumber of atom columns R (the rank of the cross-row update).
d: Array1<f64>d_k = w·s'_k, the scalar D-coefficient of column k. Length R.
entries: Vec<(usize, usize, f64)>Per-row column entries (global_t_index, atom_k, z'_ik): each tuple
places z'_ik at U[global_t_index, atom_k]. The global_t_index is
row_offsets[i] + local_slot for the row’s logit slot of atom k. Only
nonzero entries are listed (one per active (row, atom) pair).
Trait Implementations§
Source§impl Clone for IbpCrossRowSource
impl Clone for IbpCrossRowSource
Source§fn clone(&self) -> IbpCrossRowSource
fn clone(&self) -> IbpCrossRowSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IbpCrossRowSource
impl Debug for IbpCrossRowSource
Source§impl Default for IbpCrossRowSource
impl Default for IbpCrossRowSource
Source§fn default() -> IbpCrossRowSource
fn default() -> IbpCrossRowSource
Auto Trait Implementations§
impl Freeze for IbpCrossRowSource
impl RefUnwindSafe for IbpCrossRowSource
impl Send for IbpCrossRowSource
impl Sync for IbpCrossRowSource
impl Unpin for IbpCrossRowSource
impl UnsafeUnpin for IbpCrossRowSource
impl UnwindSafe for IbpCrossRowSource
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.