From 3f36f3d32e4c216b8454f9e97b4f1c3580f41465 Mon Sep 17 00:00:00 2001 From: Daniel Karrasch Date: Wed, 14 Apr 2021 12:41:53 +0200 Subject: [PATCH] make adjoint and transpose "recursive" --- src/indexablemap.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/indexablemap.jl b/src/indexablemap.jl index 980ce252..fdbd4f6b 100644 --- a/src/indexablemap.jl +++ b/src/indexablemap.jl @@ -12,8 +12,8 @@ LinearAlgebra.isposdef(A::IndexableMap) = isposdef(A.lmap) Base.:(==)(A::IndexableMap, B::IndexableMap) = A.lmap == B.lmap -Base.adjoint(A::IndexableMap) = IndexableMap(adjoint(A.lmap), (i,j) -> conj(A.getind(j,i))) -Base.transpose(A::IndexableMap) = IndexableMap(transpose(A.lmap), (i,j) -> A.getind(j,i)) +Base.adjoint(A::IndexableMap) = IndexableMap(adjoint(A.lmap), (i,j) -> adjoint(A.getind(j,i))) +Base.transpose(A::IndexableMap) = IndexableMap(transpose(A.lmap), (i,j) -> transpose(A.getind(j,i))) # rewrapping preserves indexability but redefines, e.g., symmetry properties LinearMap(A::IndexableMap; getind=nothing, kwargs...) = IndexableMap(LinearMap(A.lmap; kwargs...), getind) # addition/subtraction/scalar multiplication preserve indexability