@@ -263,12 +263,14 @@ end
263
263
@test (P' )' === P # test adjoint of adjoint
264
264
@test size (P' ) == AbstractFFTs. output_size (P) # test size of adjoint
265
265
@test dot (y, P * x) ≈ dot (P' * y, x) # test validity of adjoint
266
- @test dot (y, P \ x) ≈ dot (P' \ y, x)
266
+ @test dot (y, P \ x) ≈ dot (P' \ y, x) # test inv of adjoint
267
+ @test dot (y, P \ x) ≈ dot (AbstractFFTs. plan_inv (P' ) * y, x) # test plan_inv of adjoint
267
268
Pinv = plan_ifft (y)
268
269
@test (Pinv' )' * y == Pinv * y
269
270
@test size (Pinv' ) == AbstractFFTs. output_size (Pinv)
270
271
@test dot (x, Pinv * y) ≈ dot (Pinv' * x, y)
271
272
@test dot (x, Pinv \ y) ≈ dot (Pinv' \ x, y)
273
+ @test dot (x, Pinv \ y) ≈ dot (AbstractFFTs. plan_inv (Pinv' ) * x, y)
272
274
@test_throws MethodError mul! (x, P' , y)
273
275
end
274
276
end
@@ -281,14 +283,17 @@ end
281
283
P = plan_rfft (x, dims)
282
284
y = randn (ComplexF64, size (P * x))
283
285
@test (P' )' * x == P * x
284
- @test size (P' ) == AbstractFFTs. output_size (P)
286
+ @test size (P' ) == AbstractFFTs. output_size (P)
285
287
@test dot (real .(y), real .(P * x)) + dot (imag .(y), imag .(P * x)) ≈ dot (P' * y, x)
286
288
@test dot (real .(y), real .(P' \ x)) + dot (imag .(y), imag .(P' \ x)) ≈ dot (P \ y, x)
289
+ @test dot (real .(y), real .(AbstractFFTs. plan_inv (P' ) * x)) +
290
+ dot (imag .(y), imag .(AbstractFFTs. plan_inv (P' ) * x)) ≈ dot (P \ y, x)
287
291
Pinv = plan_irfft (y, size (x)[first (dims)], dims)
288
292
@test (Pinv' )' * y == Pinv * y
289
293
@test size (Pinv' ) == AbstractFFTs. output_size (Pinv)
290
294
@test dot (x, Pinv * y) ≈ dot (real .(y), real .(Pinv' * x)) + dot (imag .(y), imag .(Pinv' * x))
291
295
@test dot (x, Pinv' \ y) ≈ dot (real .(y), real .(Pinv \ x)) + dot (imag .(y), imag .(Pinv \ x))
296
+ @test dot (x, AbstractFFTs. plan_inv (Pinv' ) * y) ≈ dot (real .(y), real .(Pinv \ x)) + dot (imag .(y), imag .(Pinv \ x))
292
297
end
293
298
end
294
299
end
0 commit comments