% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/solver_utils.R
\name{.solver_build_lambda_block}
\alias{.solver_build_lambda_block}
\title{Build Block-Diagonal Penalty Matrix}
\usage{
.solver_build_lambda_block(
  Lambda,
  K,
  unique_penalty_per_partition,
  L_partition_list
)
}
\arguments{
\item{Lambda}{Shared \eqn{p \times p} penalty matrix.}

\item{K}{Integer; number of interior knots (\eqn{K+1} partitions).}

\item{unique_penalty_per_partition}{Logical; if \code{TRUE}, add the
corresponding element of \code{L_partition_list} to each block.}

\item{L_partition_list}{List of \eqn{K+1} partition-specific
\eqn{p \times p} penalty matrices.}
}
\value{
A \eqn{P \times P} block-diagonal matrix,
  \eqn{P = p \times (K+1)}.
}
\description{
Assembles the full \eqn{P \times P} block-diagonal penalty matrix
\eqn{\boldsymbol{\Lambda}} from a shared per-partition penalty
\code{Lambda} and optional partition-specific additive terms.
\eqn{P = p \times (K+1)} where \eqn{p} is the number of basis terms
per partition.
}
\details{
When \code{unique_penalty_per_partition = TRUE}, the \eqn{k}-th
diagonal block is \code{Lambda + L_partition_list[[k]]}; otherwise
every block is \code{Lambda}.
}
\keyword{internal}
