@@ -9,7 +9,6 @@ export leftorth, leftorth!, rightorth, rightorth!
99export leftnull, leftnull!, rightnull, rightnull!
1010export copy_oftype, permutedcopy_oftype, one!
1111export TruncationScheme, notrunc, truncbelow, truncerr, truncdim, truncspace, PolarViaSVD
12- # export LAPACK_HouseholderQR, LAPACK_HouseholderLQ
1312
1413using .. TensorKit
1514using .. TensorKit: AdjointTensorMap, SectorDict, OFA, blocktype, foreachblock, one!
6059const RealOrComplexFloat = Union{AbstractFloat,Complex{<: AbstractFloat }}
6160
6261# ------------------------------#
63- # Singular value decomposition #
62+ # LinearAlgebra overloads
6463# ------------------------------#
65- function LinearAlgebra. svdvals! (t:: TensorMap{<:RealOrComplexFloat} )
66- return SectorDict (c => LinearAlgebra. svdvals! (b) for (c, b) in blocks (t))
67- end
68- LinearAlgebra. svdvals! (t:: AdjointTensorMap ) = svdvals! (adjoint (t))
69-
70- # --------------------------#
71- # Eigenvalue decomposition #
72- # --------------------------#
73-
74- function LinearAlgebra. eigvals! (t:: TensorMap{<:RealOrComplexFloat} ; kwargs... )
75- return SectorDict (c => complex (LinearAlgebra. eigvals! (b; kwargs... ))
76- for (c, b) in blocks (t))
77- end
78- function LinearAlgebra. eigvals! (t:: AdjointTensorMap{<:RealOrComplexFloat} ; kwargs... )
79- return SectorDict (c => conj! (complex (LinearAlgebra. eigvals! (b; kwargs... )))
80- for (c, b) in blocks (t))
81- end
64+ LinearAlgebra. svdvals (t:: AbstractTensorMap ) = diagview (svd_vals (t))
65+ LinearAlgebra. svdvals! (t:: AbstractTensorMap ) = diagview (svd_vals! (t))
66+ LinearAlgebra. eigvals (t:: AbstractTensorMap ) = diagview (eigvals (t))
67+ LinearAlgebra. eigvals! (t:: AbstractTensorMap ) = diagview (eigvals! (t))
8268
8369# --------------------------------------------------#
8470# Checks for hermiticity and positive definiteness #
8571# --------------------------------------------------#
86- function LinearAlgebra. ishermitian (t:: TensorMap )
72+ function LinearAlgebra. ishermitian (t:: AbstractTensorMap )
8773 domain (t) == codomain (t) || return false
8874 InnerProductStyle (t) === EuclideanInnerProduct () || return false # hermiticity only defined for euclidean
8975 for (c, b) in blocks (t)
@@ -92,7 +78,7 @@ function LinearAlgebra.ishermitian(t::TensorMap)
9278 return true
9379end
9480
95- function LinearAlgebra. isposdef! (t:: TensorMap )
81+ function LinearAlgebra. isposdef! (t:: AbstractTensorMap )
9682 domain (t) == codomain (t) ||
9783 throw (SpaceMismatch (" `isposdef` requires domain and codomain to be the same" ))
9884 InnerProductStyle (spacetype (t)) === EuclideanInnerProduct () || return false
0 commit comments