CurrentModule = MatrixAlgebraKit
CollapsedDocStrings = true
Currently, truncations are supported through the following different methods:
notrunc
truncrank
trunctol
truncfilter
truncerror
It is additionally possible to combine truncation strategies by making use of the & operator.
For example, truncating to a maximal dimension 10, and discarding all values below 1e-6 would be achieved by:
maxdim = 10
atol = 1e-6
combined_trunc = truncrank(maxdim) & trunctol(; atol)When using truncated decompositions such as svd_trunc, eig_trunc, or eigh_trunc,
an additional truncation error value is returned. This error is defined as the 2-norm of the discarded
singular values or eigenvalues, providing a measure of the approximation quality.
For example:
U, S, Vᴴ, ϵ = svd_trunc(A; trunc=truncrank(10))
# ϵ is the 2-norm of the discarded singular values