% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_B.R
\name{.woodbury_redecompose_weighted}
\alias{.woodbury_redecompose_weighted}
\title{Per-Iteration Weighted Woodbury Redecomposition}
\usage{
.woodbury_redecompose_weighted(
  Delta_V,
  X_block,
  DV_X,
  W,
  X,
  K,
  p_expansions,
  X_gram_weighted,
  Lambda,
  schur_corrections,
  unique_penalty_per_partition,
  L_partition_list,
  parallel_eigen,
  cl,
  chunk_size,
  num_chunks,
  rem_chunks,
  rank_threshold_fraction = 1/3,
  family
)
}
\arguments{
\item{Delta_V}{Fixed \eqn{N \times N} matrix
\eqn{\mathbf{V}^{-1} - \mathbf{I}}.}

\item{X_block}{Full \eqn{N \times P} block-diagonal design matrix.}

\item{DV_X}{Precomputed \eqn{N \times P} product
of \eqn{(\mathbf{V}^{-1} - \mathbf{I})\mathbf{X}}.}

\item{W}{Length-\eqn{N} vector of current GLM working weights.}

\item{X}{List of partition-specific design matrices.}

\item{K, p_expansions}{Integer dimensions.}

\item{X_gram_weighted}{List of \eqn{K+1} weighted Gram matrices
\eqn{\mathbf{X}_k^{\top}\mathrm{diag}(\mathbf{W}_k)\mathbf{X}_k}.}

\item{Lambda}{Shared \eqn{p \times p} penalty matrix.}

\item{schur_corrections}{List of \eqn{K+1} Schur correction matrices.}

\item{unique_penalty_per_partition}{Logical.}

\item{L_partition_list}{Partition-specific penalty matrices.}

\item{parallel_eigen}{Logical; parallel eigendecomposition.}

\item{cl, chunk_size, num_chunks, rem_chunks}{Parallel parameters.}

\item{rank_threshold_fraction}{Numeric; Woodbury threshold (default 1/3).}

\item{family}{GLM family object.}
}
\value{
A list with the same structure as \code{.woodbury_decompose_V}:
\describe{
  \item{use_woodbury}{Logical; FALSE if rank exceeds threshold.}
  \item{Ghalf_corrected}{List of corrected \eqn{\mathbf{G}_{\mathrm{on},k}^{1/2}}.}
  \item{GhalfInv_corrected}{List of corrected \eqn{\mathbf{G}_{\mathrm{on},k}^{-1/2}}.}
  \item{G_corrected}{List of corrected \eqn{\mathbf{G}_{\mathrm{on},k}}.}
  \item{E}{Off-diagonal low-rank factor (\eqn{P \times r}), denoted by
    \eqn{\mathbf{E}} in the supplement.}
  \item{J_signs}{Length-\eqn{r} sign vector, i.e.\ the diagonal of
    \eqn{\mathbf{J}}.}
  \item{r}{Integer effective rank.}
  \item{inner_inv}{Precomputed \eqn{r \times r} Woodbury inner inverse; in
    supplement notation,
    \eqn{(\mathbf{J}^{-1} + \mathbf{E}^{\top}\mathbf{G}_{\mathrm{on}}
    \mathbf{E})^{-1}}.}
  \item{GL}{List of per-partition matrices corresponding to
    \eqn{\mathbf{G}_{\mathrm{on},k}\mathbf{E}[rows_k,]} in supplement notation.}
  \item{L,S_signs,M}{Legacy internal aliases for
    \code{E}, \code{J_signs}, and \code{inner_inv}.}
}
}
\description{
Weighted analogue of \code{.woodbury_decompose_V()}. At each GLM
iteration, this helper rebuilds the current correlated information,
absorbs the block-diagonal part into
\eqn{\mathbf{G}_{\mathrm{on}}^{-1}}, and refactors the cross-partition
remainder as \eqn{\mathbf{E}\mathbf{J}\mathbf{E}^{\top}}.
}
\details{
It is standalone in the sense that it returns the full Woodbury state
for the current working weights:
corrected block-diagonal factors, the low-rank basis, and the small
inverse \eqn{(\mathbf{J}^{-1} +
\mathbf{E}^{\top}\mathbf{G}_{\mathrm{on}}\mathbf{E})^{-1}}.
}
\keyword{internal}
