Skip to main content

Module linalg

Module linalg 

Source
Expand description

Host-side dense linear algebra for covariance-matrix strategies.

CMA-ES and CMSA-ES need a symmetric eigendecomposition (for the sampling transform B·diag(√Λ) and the conditioning matrix C^{-1/2}) and a Cholesky factor (for CMSA-ES sampling). Burn 0.21 ships no Cholesky or eigendecomposition primitive, and the workspace deliberately avoids a nalgebra dependency (ADR 0021 §3 / research note cma-es-sampling-and-numerics §L4: the logged nalgebra 4×4 symmetric-eigen bug and its non-portable LAPACK path do not justify the dependency for the D ≤ 30 regime these strategies target). Both routines therefore run on host Vec<f32> buffers — covariance matrices are tiny, so the device round-trip would dominate any on-device kernel anyway.

All matrices are row-major n × n: entry (i, j) lives at index i * n + j.

Structs§

SymEigen
Symmetric eigendecomposition A = V · diag(Λ) · Vᵀ.

Functions§

cholesky
Lower-triangular Cholesky factor L with L · Lᵀ = a.
jacobi_eigen
Symmetric eigendecomposition via the cyclic Jacobi method.
matvec
Matrix–vector product y = M · x for a row-major n × n matrix M.
symmetrize
Forces the row-major n × n matrix m to be exactly symmetric in place.