% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/solver_utils.R
\name{.solver_recompute_G_at_estimate}
\alias{.solver_recompute_G_at_estimate}
\title{Recompute G, Ghalf, and GhalfInv at a Supplied Coefficient Estimate}
\usage{
.solver_recompute_G_at_estimate(
  X,
  y,
  result,
  K,
  Lambda,
  family,
  order_list,
  glm_weight_function,
  schur_correction_function,
  need_dispersion_for_estimation,
  dispersion_function,
  observation_weights,
  VhalfInv,
  parallel_eigen,
  parallel_matmult,
  cl,
  chunk_size,
  num_chunks,
  rem_chunks,
  unique_penalty_per_partition,
  L_partition_list,
  ...
)
}
\arguments{
\item{X}{List of partition-specific design matrices
\eqn{\mathbf{X}_k}.}

\item{y}{List of response vectors \eqn{\mathbf{y}_k} by partition.}

\item{result}{List of current coefficient column vectors
\eqn{\tilde{\boldsymbol{\beta}}_k} by partition.}

\item{K}{Integer; number of interior knots.}

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

\item{family}{GLM family object.}

\item{order_list}{List of index vectors mapping partition rows to
original data ordering.}

\item{glm_weight_function}{Function computing GLM working weights
\eqn{\mathbf{W}_k}.}

\item{schur_correction_function}{Function computing Schur corrections
to the information matrix.}

\item{need_dispersion_for_estimation}{Logical; if \code{TRUE},
estimate dispersion before computing weights.}

\item{dispersion_function}{Dispersion estimation function.}

\item{observation_weights}{List of observation weights
\eqn{\mathbf{D}_k} by partition.}

\item{VhalfInv}{Inverse square root correlation matrix, or
\code{NULL}.}

\item{parallel_eigen, parallel_matmult}{Logical flags for parallel
computation.}

\item{cl}{Parallel cluster object.}

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

\item{unique_penalty_per_partition}{Logical.}

\item{L_partition_list}{List of partition-specific penalty matrices.}

\item{...}{Passed to weight, correction, and dispersion functions.}
}
\value{
A list with components \code{G}, \code{Ghalf}, and
  \code{GhalfInv}, each a list of \eqn{K+1} matrices.
  \code{G[[k]]} is computed as \code{tcrossprod(Ghalf[[k]])} to
  guarantee exact symmetry.
}
\description{
Given current constrained coefficient estimates \code{result},
recomputes the penalized information matrix
\eqn{\mathbf{G}_k = (\mathbf{X}_k^{\top}\mathbf{W}_k
\mathbf{D}_k\mathbf{X}_k + \boldsymbol{\Lambda}_k)^{-1}} and its
matrix square roots for each partition.
}
\details{
This is used after Newton-Raphson convergence in Path 3 of
\code{get_B()} and at the final return in \code{blockfit_solve()}
when \code{return_G_getB = TRUE}.  The implementation matches
\code{.recompute_G_at_estimate()} exactly; it exists here so both
solvers can call the same numerical core.
}
\keyword{internal}
