Improve MatrixOp parametrisation

Sat, 20 Feb 2021 16:26:41 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sat, 20 Feb 2021 16:26:41 -0500
changeset 23
4399bf266660
parent 22
d5e10d963303
child 24
da6c7475dd0e

Improve MatrixOp parametrisation

src/LinOps.jl file | annotate | diff | comparison | revisions
--- a/src/LinOps.jl	Sat Feb 20 16:26:31 2021 -0500
+++ b/src/LinOps.jl	Sat Feb 20 16:26:41 2021 -0500
@@ -8,7 +8,7 @@
 
 module LinOps
 
-export LinOp, IdOp, AdjointOp, AdjointableOp,
+export LinOp, IdOp, AdjointOp, AdjointableOp, MatrixOp,
        calc_adjoint, calc_adjoint!, inplace!,
        opnorm_estimate
 
@@ -75,8 +75,8 @@
 
 # Matrix operator
 
-struct MatrixOp{T<:Real}
-    m :: AbstractArray{T, 2}
+struct MatrixOp{T<:Real} <: LinOp{Vector{T}, Vector{T}}
+    m :: Matrix{T}
 end
 
 function (op::MatrixOp{T})(v::Vector{T}) where T

mercurial