@@ -263,12 +263,14 @@ end
263263 @test (P' )' === P # test adjoint of adjoint
264264 @test size (P' ) == AbstractFFTs. output_size (P) # test size of adjoint
265265 @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
267268 Pinv = plan_ifft (y)
268269 @test (Pinv' )' * y == Pinv * y
269270 @test size (Pinv' ) == AbstractFFTs. output_size (Pinv)
270271 @test dot (x, Pinv * y) ≈ dot (Pinv' * x, y)
271272 @test dot (x, Pinv \ y) ≈ dot (Pinv' \ x, y)
273+ @test dot (x, Pinv \ y) ≈ dot (AbstractFFTs. plan_inv (Pinv' ) * x, y)
272274 @test_throws MethodError mul! (x, P' , y)
273275 end
274276 end
@@ -281,14 +283,17 @@ end
281283 P = plan_rfft (x, dims)
282284 y = randn (ComplexF64, size (P * x))
283285 @test (P' )' * x == P * x
284- @test size (P' ) == AbstractFFTs. output_size (P)
286+ @test size (P' ) == AbstractFFTs. output_size (P)
285287 @test dot (real .(y), real .(P * x)) + dot (imag .(y), imag .(P * x)) ≈ dot (P' * y, x)
286288 @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)
287291 Pinv = plan_irfft (y, size (x)[first (dims)], dims)
288292 @test (Pinv' )' * y == Pinv * y
289293 @test size (Pinv' ) == AbstractFFTs. output_size (Pinv)
290294 @test dot (x, Pinv * y) ≈ dot (real .(y), real .(Pinv' * x)) + dot (imag .(y), imag .(Pinv' * x))
291295 @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))
292297 end
293298 end
294299 end
0 commit comments