Sat, 20 Feb 2021 19:10:50 -0500
Define some basic operations for MatrixOps
src/LinOps.jl | file | annotate | diff | comparison | revisions |
--- 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