% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/blockfit_solve.R
\name{.bf_split_components}
\alias{.bf_split_components}
\title{Split Design and Penalty into Spline and Flat Components}
\usage{
.bf_split_components(
  X,
  flat_cols,
  p_expansions,
  K,
  Lambda,
  L_partition_list,
  A,
  constraint_values
)
}
\arguments{
\item{X}{List of \eqn{K+1} design matrices (\eqn{N_k \times p_expansions}).}

\item{flat_cols}{Integer vector of flat column indices.}

\item{p_expansions}{Integer; total columns per partition.}

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

\item{Lambda}{\eqn{p_expansions \times p_expansions} shared penalty matrix.}

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

\item{A}{Full \eqn{P \times R_constraints} constraint matrix.}

\item{constraint_values}{List of constraint right-hand sides.}
}
\value{
A named list with elements:
\describe{
  \item{X_spline}{List of \eqn{K+1} matrices, spline columns only.}
  \item{X_flat}{List of \eqn{K+1} matrices, flat columns only.}
  \item{Lambda_spline}{\eqn{nc_s \times nc_s} penalty submatrix.}
  \item{Lambda_flat}{\eqn{nc_f \times nc_f} penalty submatrix.}
  \item{L_part_spline}{List of partition-specific penalty submatrices
    for the spline columns.}
  \item{A_spline}{Spline-only constraint matrix (columns pruned
    and rank-reduced via pivoted QR).}
  \item{nca_spline}{Integer; number of columns in
    \code{A_spline}.}
  \item{constraint_values_spline}{List of constraint RHS vectors
    restricted to spline rows.}
  \item{spline_cols}{Integer vector of spline column indices.}
  \item{nc_spline}{Integer; number of spline columns.}
  \item{nc_flat}{Integer; number of flat columns.}
  \item{A_flat}{Flat-only constraint matrix (rows for flat coefficients,
    columns pruned and rank-reduced). Used to enforce mixed constraints
    on the flat update step.}
  \item{nca_flat}{Integer; number of columns in \code{A_flat}.}
  \item{A_full}{The original full constraint matrix \code{A}, retained
    for mixed-constraint enforcement.}
  \item{flat_rows_all}{Integer vector of flat-coefficient row indices
    in the full P-space.}
  \item{spline_rows_all}{Integer vector of spline-coefficient row indices
    in the full P-space.}
  \item{has_mixed_constraints}{Logical; TRUE if any constraint column
    in A has nonzero entries on both spline and flat rows.}
  \item{mixed_constraint_cols}{Integer vector of column indices in the
    original A that are mixed (touch both spline and flat rows).}
}
}
\description{
Partitions the per-partition design matrices, penalty matrices, and
constraint matrix into "spline" (columns receiving partition-specific
coefficients) and "flat" (columns receiving a single shared
coefficient across all partitions) subsets.
}
\keyword{internal}
