% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_B.R
\name{.lagrangian_project_woodbury}
\alias{.lagrangian_project_woodbury}
\title{Woodbury-Corrected Lagrangian Projection}
\usage{
.lagrangian_project_woodbury(
  GhalfXy_V,
  Ghalf_corrected,
  A,
  K,
  p_expansions,
  R_constraints,
  constraint_value_vectors,
  family,
  wb_sqrt,
  parallel_aga,
  parallel_matmult,
  cl,
  chunk_size,
  num_chunks,
  rem_chunks
)
}
\arguments{
\item{GhalfXy_V}{Numeric column vector of length \eqn{P};
\eqn{\mathbf{G}_{\mathrm{on}}^{1/2}} applied to the per-partition GLS
cross-products \eqn{\mathbf{X}_k^{\top}\mathbf{V}^{-1}\mathbf{y}_k}.}

\item{Ghalf_corrected}{List of \eqn{K+1} corrected
\eqn{\mathbf{G}_{\mathrm{on},k}^{1/2}} matrices.}

\item{A}{Constraint matrix (\eqn{P \times R}).}

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

\item{constraint_value_vectors}{Constraint RHS list encoding
\eqn{\mathbf{A}^{\top}\boldsymbol{\beta} = \mathbf{c}}.}

\item{family}{GLM family object.}

\item{wb_sqrt}{Output of \code{.woodbury_halfsqrt_components},
containing the internal rank-\eqn{r} representation of
\eqn{\mathbf{F}^{1/2}}: \code{U_Q} / \code{Q_basis}
(basis matching supplement \eqn{\mathbf{Q}}), \code{C} and \code{C_inv} (diagonal correction
coefficients), and \code{GchalfUQ} (partition-wise copies of
\eqn{\mathbf{G}_{\mathrm{on},k}^{1/2}\mathbf{U}_Q[rows_k,]}).}

\item{parallel_aga, parallel_matmult}{Logical flags.}

\item{cl, chunk_size, num_chunks, rem_chunks}{Parallel parameters.}
}
\value{
A list of \eqn{K+1} coefficient column vectors.
}
\description{
Applies the constrained projection for the structured-correlation
Woodbury path. In supplement notation,
\eqn{\mathbf{G}^{1/2} = \mathbf{G}_{\mathrm{on}}^{1/2}\mathbf{F}^{1/2}},
where \eqn{\mathbf{G}_{\mathrm{off}}^{-1} = \mathbf{E}\mathbf{J}\mathbf{E}^{\top}}
and \eqn{\mathbf{F}^{1/2}} carries the low-rank correction.
}
\details{
The routine follows the same four transformed-OLS steps as
\code{.lagrangian_project}: form \eqn{\mathbf{y}^{*}},
form \eqn{\mathbf{X}^{*}}, solve the OLS projection, then back-transform.
Only steps involving \eqn{\mathbf{G}^{1/2}} differ, and those are handled
as a block-diagonal multiplication through
\eqn{\mathbf{G}_{\mathrm{on}}^{1/2}} plus a rank-\eqn{r} update.

Internally, \eqn{\mathbf{F}^{1/2}} is stored as
\eqn{\mathbf{I} - \mathbf{U}_Q\mathbf{C}\mathbf{U}_Q^{\top}}, where
\code{U_Q} spans the same subspace as the supplement matrix
\eqn{\mathbf{Q}} and \code{C} is diagonal.
}
\keyword{internal}
