From e5829db9b782bee1b8ff7be1c96a3e6ae01db729 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Fri, 8 Dec 2023 17:21:26 +0530 Subject: [PATCH] Wrap parent of `PDMat` in `Symmetric` in `eigmin`/`eigmax` (#200) * Wrap parent of PDMat in Hermitian in eigmin/eigmax * Use `Symmetric` instead of `Hermitian` Co-authored-by: David Widmann --------- Co-authored-by: David Widmann --- src/pdmat.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pdmat.jl b/src/pdmat.jl index d47153e..7f4fcf0 100644 --- a/src/pdmat.jl +++ b/src/pdmat.jl @@ -87,8 +87,8 @@ end Base.inv(a::PDMat) = PDMat(inv(a.chol)) LinearAlgebra.det(a::PDMat) = det(a.chol) LinearAlgebra.logdet(a::PDMat) = logdet(a.chol) -LinearAlgebra.eigmax(a::PDMat) = eigmax(a.mat) -LinearAlgebra.eigmin(a::PDMat) = eigmin(a.mat) +LinearAlgebra.eigmax(a::PDMat) = eigmax(Symmetric(a.mat)) +LinearAlgebra.eigmin(a::PDMat) = eigmin(Symmetric(a.mat)) Base.kron(A::PDMat, B::PDMat) = PDMat(kron(A.mat, B.mat), Cholesky(kron(A.chol.U, B.chol.U), 'U', A.chol.info)) LinearAlgebra.sqrt(A::PDMat) = PDMat(sqrt(Hermitian(A.mat)))