Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1000 Bytes

File metadata and controls

37 lines (29 loc) · 1000 Bytes
CurrentModule = MatrixAlgebraKit
CollapsedDocStrings = true

Truncations

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)

Truncation Error

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