pub struct LatentInnerSolver<'a, A: ArrowSystemAssembler> {
pub beta: Array1<f64>,
pub latent: &'a mut LatentCoordValues,
pub assembler: A,
pub options: LatentInnerOptions,
}Expand description
Joint (t, β) inner Newton solver exploiting arrow structure.
§Usage
- Call
LatentInnerSolver::newwith the initialβ, a mutableLatentCoordValues, anArrowSystemAssembler, and options. - Call
LatentInnerSolver::solveto run the inner Newton loop. Bothβand the latent field are updated in place. - The returned
LatentInnerOutcome::factor_cacheis the artifact Piece 3’s IFT warm-start consumes when the outer loop next perturbs(β, ρ).
Fields§
§beta: Array1<f64>§latent: &'a mut LatentCoordValues§assembler: A§options: LatentInnerOptionsImplementations§
Source§impl<'a, A: ArrowSystemAssembler> LatentInnerSolver<'a, A>
impl<'a, A: ArrowSystemAssembler> LatentInnerSolver<'a, A>
pub fn new( beta: Array1<f64>, latent: &'a mut LatentCoordValues, assembler: A, options: LatentInnerOptions, ) -> Self
Sourcepub fn solve(&mut self) -> Result<LatentInnerOutcome, String>
pub fn solve(&mut self) -> Result<LatentInnerOutcome, String>
Run the joint Newton loop.
Numerical-stability invariants:
initial_ridge_t,initial_ridge_betaare clamped to≥ 0.- On a per-row or Schur PD failure, both ridges are escalated
by
lm_grow(or seeded at1e-6when starting from0). max_ridgeis the cold-restart trigger: if we exhaust the ramp and the Hessian is still non-PSD, the loop bails with a clear diagnostic citing the iteration index and both ridge levels reached — the outer driver should treat this as an identifiability failure (missing gauge-fixing penalty, collinear basis, etc.).
Auto Trait Implementations§
impl<'a, A> !UnwindSafe for LatentInnerSolver<'a, A>
impl<'a, A> Freeze for LatentInnerSolver<'a, A>where
A: Freeze,
impl<'a, A> RefUnwindSafe for LatentInnerSolver<'a, A>where
A: RefUnwindSafe,
impl<'a, A> Send for LatentInnerSolver<'a, A>where
A: Send,
impl<'a, A> Sync for LatentInnerSolver<'a, A>where
A: Sync,
impl<'a, A> Unpin for LatentInnerSolver<'a, A>where
A: Unpin,
impl<'a, A> UnsafeUnpin for LatentInnerSolver<'a, A>where
A: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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 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>
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 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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.