% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HelperFunctions.R
\name{.compute_hat_diag}
\alias{.compute_hat_diag}
\title{Compute the Diagonal of the Tuning Hat Matrix}
\usage{
.compute_hat_diag(X, G, A, AGAInv, K, p_expansions, eps = 1e-07)
}
\arguments{
\item{X}{List of partition-specific design matrices.}

\item{G}{List of partition-specific \eqn{\mathbf{G}_k} matrices.}

\item{A}{Constraint matrix.}

\item{AGAInv}{Inverse of \eqn{\mathbf{A}^{\top}\mathbf{G}\mathbf{A}}.}

\item{K}{Number of interior knots.}

\item{p_expansions}{Number of columns per partition.}

\item{eps}{Numeric floor used to keep \eqn{1 - h_{ii}} away from zero.}
}
\value{
List with \code{h_diag} and \code{C_list}, both partition-wise.
}
\description{
Computes the per-observation diagonal of the constrained hat matrix used
during tuning, without forming the full \eqn{N \times N} matrix.
}
\keyword{internal}
