
Build a kernel-matrix accessor (internal)
dot-make_kernel_accessor.RdWraps a fully-materialised kernel matrix in a list of accessor closures. The SMO solver and other iterative consumers read kernel values through this interface so that future phases can replace the underlying representation (e.g., the F6 LRU cache backed by Rcpp) without touching the consumers.
Value
A list with components:
get_column(p)Returns column
pofOmega(length-Nnumeric vector).get_diag()Returns
diag(Omega)(length-Nnumeric vector). Cached at construction.get_entry(p, q)Returns the scalar
Omega[p, q].get_matvec(v)Returns the matrix-vector product
as.numeric(Omega %*% v)(length-N). Used for one-shot gradient refreshes; preserves BLAS efficiency.nInteger, equal to
nrow(Omega).
Details
This F2 implementation is a thin wrapper over the materialised matrix:
every closure delegates directly to base-R indexing or BLAS. The
diagonal is computed once at construction (diag() is called a single
time) and reused on every get_diag() call.
Symmetry assumption. The wrapped matrix is assumed symmetric. Both
\(\Omega\) (a kernel matrix for symmetric K) and \(\Omega_s =
\tfrac{1}{2}(\Omega + a\,\Omega^*)\) (used by the symmetric models when
K satisfies Assumption 3) are symmetric throughout this package, so
callers may use get_column(p)[k] in place of a row read
Omega[p, k]. The SMO solver relies on this in its WSS3 step.