dot-solver_build_lambda_block: Build Block-Diagonal Penalty Matrix

.solver_build_lambda_blockR Documentation

Build Block-Diagonal Penalty Matrix

Description

Assembles the full P \times P block-diagonal penalty matrix \boldsymbol{\Lambda} from a shared per-partition penalty Lambda and optional partition-specific additive terms. P = p \times (K+1) where p is the number of basis terms per partition.

Usage

.solver_build_lambda_block(
  Lambda,
  K,
  unique_penalty_per_partition,
  L_partition_list
)

Arguments

Lambda

Shared p \times p penalty matrix.

K

Integer; number of interior knots (K+1 partitions).

unique_penalty_per_partition

Logical; if TRUE, add the corresponding element of L_partition_list to each block.

L_partition_list

List of K+1 partition-specific p \times p penalty matrices.

Details

When unique_penalty_per_partition = TRUE, the k-th diagonal block is Lambda + L_partition_list[[k]]; otherwise every block is Lambda.

Value

A P \times P block-diagonal matrix, P = p \times (K+1).


lgspline documentation built on May 8, 2026, 5:07 p.m.