Skip to content

Commit

Permalink
Add KroneckerSum implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanaelbosch committed Oct 12, 2023
1 parent 83c3813 commit 5791ba2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/kroneckersum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ end
Base.copy(K::KroneckerSum) = kroneckersum(copy(K.A), copy(K.B))
Base.deepcopy(K::KroneckerSum) = kroneckersum(deepcopy(K.A), deepcopy(K.B))
Base.similar(K::KroneckerSum) = kroneckersum(similar(K.A), similar(K.B))
Base.copy!(K1::KroneckerSum, K2::KroneckerSum) = begin
Base.copy!(K1.A, K2.A)
Base.copy!(K1.B, K2.B)
return K1
end

order(M::AbstractKroneckerSum) = order(M.A) + order(M.B)
issquare(M::AbstractKroneckerSum) = true
Expand Down

0 comments on commit 5791ba2

Please sign in to comment.