Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion src/precompile/factorizations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,26 @@ function precompile_factorizations(::Type{S}; eltypes = PRECOMPILE_ELTYPES) wher
t = randn(T, W ← W) # square
tr = randn(T, W ← V) # tall (codomain larger) -> non-empty left null space
tw = randn(T, V ← W) # wide (domain larger) -> non-empty right null space
th = (t + t') / 2 # hermitian (square, Euclidean inner product)

# projectors
th = project_hermitian(t) # hermitian (square, Euclidean inner product)
project_antihermitian(t)
project_isometric(t)

# exponential
exponential(th)

# Singular value decomposition
svd_full(t)
svd_compact(t)
svd_vals(t)
svd_trunc(t; trunc = truncrank(1))
svd_trunc(t; trunc = trunctol(; atol = 1.0e-10))
svd_trunc(t; trunc = truncerror(; atol = 1.0e-10))
svd_trunc(t; trunc = notrunc())
svd_trunc(t; trunc = truncspace(space(t, 1)))
svd_trunc(t; trunc = truncrank(1) | trunctol(; atol = 1.0e-10))
svd_trunc(t; trunc = truncrank(1) & trunctol(; atol = 1.0e-10))

# QR / LQ decompositions (null-space variants on the appropriately shaped tensors)
qr_full(t)
Expand All @@ -45,8 +58,22 @@ function precompile_factorizations(::Type{S}; eltypes = PRECOMPILE_ELTYPES) wher
# Eigenvalue decompositions (hermitian variants require a hermitian input)
eig_full(t)
eig_vals(t)
eig_trunc(t; trunc = truncrank(1))
eig_trunc(t; trunc = trunctol(; atol = 1.0e-10))
eig_trunc(t; trunc = truncerror(; atol = 1.0e-10))
eig_trunc(t; trunc = notrunc())
eig_trunc(t; trunc = truncspace(space(t, 1)))
eig_trunc(t; trunc = truncrank(1) | trunctol(; atol = 1.0e-10))
eig_trunc(t; trunc = truncrank(1) & trunctol(; atol = 1.0e-10))
eigh_full(th)
eigh_vals(th)
eigh_trunc(th; trunc = truncrank(1))
eigh_trunc(th; trunc = trunctol(; atol = 1.0e-10))
eigh_trunc(th; trunc = truncerror(; atol = 1.0e-10))
eigh_trunc(th; trunc = notrunc())
eigh_trunc(th; trunc = truncspace(space(th, 1)))
eigh_trunc(th; trunc = truncrank(1) | trunctol(; atol = 1.0e-10))
eigh_trunc(th; trunc = truncrank(1) & trunctol(; atol = 1.0e-10))

# Orthogonal / null-space helpers
left_orth(t)
Expand Down
Loading