# HG changeset patch # User Tuomo Valkonen # Date 1613866250 18000 # Node ID da6c7475dd0e69ab31bfc45068e2b4c1e40ab129 # Parent 4399bf2666609e242864442d1268ebc463bcb55b Define some basic operations for MatrixOps diff -r 4399bf266660 -r da6c7475dd0e src/LinOps.jl --- a/src/LinOps.jl Sat Feb 20 16:26:41 2021 -0500 +++ b/src/LinOps.jl Sat Feb 20 19:10:50 2021 -0500 @@ -91,4 +91,16 @@ return opnorm(op.m, 2) end +function Base.:+(a::MatrixOp{T}, b::MatrixOp{T}) where T + return MatrixOp(a.m+b.m) end + +function Base.:-(a::MatrixOp{T}, b::MatrixOp{T}) where T + return MatrixOp(a.m-b.m) +end + +function Base.:*(a::MatrixOp{T}, b::MatrixOp{T}) where T + return MatrixOp(a.m*b.m) +end + +end