Reference
TensorAlgebra.eigen — Methodeigen(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> D, V
eigen(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> D, VCompute the eigenvalue decomposition of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm.
Keyword arguments
ishermitian::Bool: specify if the matrix is Hermitian, which can be used to speed up the computation. Iffalse, the outputeltypewill always be<:Complex.trunc: Truncation keywords foreig(h)_trunc.- Other keywords are passed on directly to MatrixAlgebraKit.
See also MatrixAlgebraKit.eig_full!, MatrixAlgebraKit.eig_trunc!, MatrixAlgebraKit.eig_vals!, MatrixAlgebraKit.eigh_full!, MatrixAlgebraKit.eigh_trunc!, and MatrixAlgebraKit.eigh_vals!.
TensorAlgebra.eigvals — Methodeigvals(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> D
eigvals(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> DCompute the eigenvalues of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm. The output is a vector of eigenvalues.
Keyword arguments
ishermitian::Bool: specify if the matrix is Hermitian, which can be used to speed up the computation. Iffalse, the outputeltypewill always be<:Complex.- Other keywords are passed on directly to MatrixAlgebraKit.
See also MatrixAlgebraKit.eig_vals! and MatrixAlgebraKit.eigh_vals!.
TensorAlgebra.factorize — Functionfactorize(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> X, Y
factorize(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> X, YCompute the decomposition of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm.
Keyword arguments
orth::Symbol=:left: specify the orthogonality of the decomposition. Currently only:leftand:rightare supported.- Other keywords are passed on directly to MatrixAlgebraKit.
TensorAlgebra.left_null — Methodleft_null(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> N
left_null(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> NCompute the left nullspace of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm. The output satisfies N' * A ≈ 0 and N' * N ≈ I.
Keyword arguments
atol::Real=0: absolute tolerance for the nullspace computation.rtol::Real=0: relative tolerance for the nullspace computation.kind::Symbol: specify the kind of decomposition used to compute the nullspace. The options are:qr,:qrposand:svd. The former two require0 == atol == rtol. The default is:qrposifatol == rtol == 0, and:svdotherwise.
TensorAlgebra.left_orth — Functionleft_orth(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> V, C
left_orth(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> V, CCompute the left orthogonal decomposition of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm.
Keyword arguments
- Keyword arguments are passed on directly to MatrixAlgebraKit.
See also MatrixAlgebraKit.left_orth!.
TensorAlgebra.left_polar — Functionleft_polar(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> W, P
left_polar(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> W, PCompute the left polar decomposition of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm.
Keyword arguments
- Keyword arguments are passed on directly to MatrixAlgebraKit.
See also MatrixAlgebraKit.left_polar!.
TensorAlgebra.lq — Functionlq(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> L, Q
lq(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> L, QCompute the LQ decomposition of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm.
Keyword arguments
full::Bool=false: select between a "full" or a "compact" decomposition, whereQis unitary orLis square, respectively.positive::Bool=false: specify if the diagonal ofLshould be positive, leading to a unique decomposition.- Other keywords are passed on directly to MatrixAlgebraKit.
See also MatrixAlgebraKit.lq_full! and MatrixAlgebraKit.lq_compact!.
TensorAlgebra.qr — Functionqr(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> Q, R
qr(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> Q, RCompute the QR decomposition of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm.
Keyword arguments
full::Bool=false: select between a "full" or a "compact" decomposition, whereQis unitary orRis square, respectively.positive::Bool=false: specify if the diagonal ofRshould be positive, leading to a unique decomposition.- Other keywords are passed on directly to MatrixAlgebraKit.
See also MatrixAlgebraKit.qr_full! and MatrixAlgebraKit.qr_compact!.
TensorAlgebra.right_null — Methodright_null(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> Nᴴ
right_null(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> NᴴCompute the right nullspace of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm. The output satisfies A * Nᴴ' ≈ 0 and Nᴴ * Nᴴ' ≈ I.
Keyword arguments
atol::Real=0: absolute tolerance for the nullspace computation.rtol::Real=0: relative tolerance for the nullspace computation.kind::Symbol: specify the kind of decomposition used to compute the nullspace. The options are:lq,:lqposand:svd. The former two require0 == atol == rtol. The default is:lqposifatol == rtol == 0, and:svdotherwise.
TensorAlgebra.right_orth — Functionright_orth(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> C, V
right_orth(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> C, VCompute the right orthogonal decomposition of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm.
Keyword arguments
- Keyword arguments are passed on directly to MatrixAlgebraKit.
See also MatrixAlgebraKit.right_orth!.
TensorAlgebra.right_polar — Functionright_polar(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> P, W
right_polar(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> P, WCompute the right polar decomposition of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm.
Keyword arguments
- Keyword arguments are passed on directly to MatrixAlgebraKit.
See also MatrixAlgebraKit.right_polar!.
TensorAlgebra.svd — Methodsvd(A::AbstractArray, labels_A, labels_codomain, labels_domain; kwargs...) -> U, S, Vᴴ
svd(A::AbstractArray, biperm::AbstractBlockPermutation{2}; kwargs...) -> U, S, VᴴCompute the SVD decomposition of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm.
Keyword arguments
full::Bool=false: select between a "thick" or a "thin" decomposition, where bothUandVᴴare unitary or isometric.trunc: Truncation keywords forsvd_trunc. Not compatible withfull=true.- Other keywords are passed on directly to MatrixAlgebraKit.
See also MatrixAlgebraKit.svd_full!, MatrixAlgebraKit.svd_compact!, and MatrixAlgebraKit.svd_trunc!.
TensorAlgebra.svdvals — Methodsvdvals(A::AbstractArray, labels_A, labels_codomain, labels_domain) -> S
svdvals(A::AbstractArray, biperm::AbstractBlockPermutation{2}) -> SCompute the singular values of a generic N-dimensional array, by interpreting it as a linear map from the domain to the codomain indices. These can be specified either via their labels, or directly through a biperm. The output is a vector of singular values.
See also MatrixAlgebraKit.svd_vals!.
TensorAlgebra.MatrixAlgebra.truncdegen — Methodtruncdegen(trunc::TruncationStrategy; atol::Real=0, rtol::Real=0)Modify a truncation strategy so that if the truncation falls within a degenerate subspace, the entire subspace gets truncated as well. A value val is considered degenerate if norm(val - truncval) ≤ max(atol, rtol * norm(truncval)) where truncval is the largest value truncated by the original truncation strategy trunc.
For now, this truncation strategy assumes the spectrum being truncated has already been reverse sorted and the strategy being wrapped outputs a contiguous subset of values including the largest one. It also only truncates for now, so may not respect if a minimum dimension was requested in the strategy being wrapped. These restrictions may be lifted in the future or provided through a different truncation strategy.