@@ -141,6 +141,25 @@ function mul!(
141
141
conj! (res)
142
142
end
143
143
144
+ function mul! (
145
+ res:: AbstractMatrix ,
146
+ op:: AdjointLinearOperator{T, S} ,
147
+ m:: AbstractMatrix ,
148
+ α,
149
+ β,
150
+ ) where {T, S}
151
+ p = op. parent
152
+ (size (m, 1 ) == size (p, 1 ) && size (res, 1 ) == size (p, 2 ) && size (m, 2 ) == size (res, 2 )) ||
153
+ throw (LinearOperatorException (" shape mismatch" ))
154
+ if ishermitian (p)
155
+ return mul! (res, p, m, α, β)
156
+ elseif p. ctprod! != = nothing
157
+ return p. ctprod! (res, m, α, β)
158
+ else
159
+ error (" Not implemented" )
160
+ end
161
+ end
162
+
144
163
function mul! (
145
164
res:: AbstractVector ,
146
165
op:: TransposeLinearOperator{T, S} ,
@@ -188,6 +207,25 @@ function mul!(
188
207
conj! (res)
189
208
end
190
209
210
+ function mul! (
211
+ res:: AbstractMatrix ,
212
+ op:: TransposeLinearOperator{T, S} ,
213
+ m:: AbstractMatrix ,
214
+ α,
215
+ β,
216
+ ) where {T, S}
217
+ p = op. parent
218
+ (size (m, 1 ) == size (p, 1 ) && size (res, 1 ) == size (p, 2 ) && size (m, 2 ) == size (res, 2 )) ||
219
+ throw (LinearOperatorException (" shape mismatch" ))
220
+ if issymmetric (p)
221
+ return mul! (res, p, m, α, β)
222
+ elseif p. tprod! != = nothing
223
+ return p. tprod! (res, m, α, β)
224
+ else
225
+ error (" Not implemented" )
226
+ end
227
+ end
228
+
191
229
function mul! (
192
230
res:: AbstractVector ,
193
231
op:: ConjugateLinearOperator{T, S} ,
@@ -200,7 +238,17 @@ function mul!(
200
238
conj! (res)
201
239
end
202
240
203
- # TODO : overload the above for matrices?
241
+ function mul! (
242
+ res:: AbstractMatrix ,
243
+ op:: ConjugateLinearOperator{T, S} ,
244
+ v:: AbstractMatrix ,
245
+ α,
246
+ β,
247
+ ) where {T, S}
248
+ p = op. parent
249
+ mul! (res, p, conj .(v), α, β)
250
+ conj! (res)
251
+ end
204
252
205
253
- (op:: AdjointLinearOperator ) = adjoint (- op. parent)
206
254
- (op:: TransposeLinearOperator ) = transpose (- op. parent)
0 commit comments