Skip to content

Commit

Permalink
make adjoint and transpose "recursive"
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarrasch committed Apr 14, 2021
1 parent 423d393 commit 3f36f3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/indexablemap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3f36f3d

Please sign in to comment.