You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/NormalOp.jl
+21-1Lines changed: 21 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,21 @@
1
1
export normalOperator
2
2
3
+
"""
4
+
NormalOp(T::Type; parent, weights)
5
+
6
+
Lazy normal operator of `parent` with an optional weighting operator `weights.`
7
+
Computes `adjoint(parent) * weights * parent`.
8
+
9
+
# Required Argument
10
+
* `T` - type of elements, .e.g. `Float64` for `ComplexF32`
11
+
12
+
# Required Keyword argument
13
+
* `parent` - Base operator
14
+
15
+
# Optional Keyword argument
16
+
* `weights` - Optional weights for normal operator. Must already be of form `weights = adjoint.(w) .* w`
17
+
18
+
"""
3
19
function LinearOperatorCollection.NormalOp(::Type{T}; parent, weights =opEye(eltype(parent), size(parent, 1), S =storage_type(parent))) where T <:Number
4
20
returnNormalOp(T, parent, weights)
5
21
end
@@ -47,7 +63,6 @@ function NormalOpImpl(parent, weights, tmp)
47
63
functionprodu!(y, parent, weights, tmp, x)
48
64
mul!(tmp, parent, x)
49
65
mul!(tmp, weights, tmp) # This can be dangerous. We might need to create two tmp vectors
50
-
mul!(tmp, weights, tmp)
51
66
returnmul!(y, adjoint(parent), tmp)
52
67
end
53
68
@@ -63,6 +78,11 @@ function Base.copy(S::NormalOpImpl)
0 commit comments