@@ -85,6 +85,33 @@ FastTransforms.ft_set_num_threads(ceil(Int, Base.Sys.CPU_THREADS/2))
85
85
@test V\ y ≈ x
86
86
end
87
87
88
+ @testset " Modified classical orthonormal polynomial transforms" begin
89
+ (n, α, β) = (16 , 0 , 0 )
90
+ P1 = plan_modifiedjac2jac (Float64, n, α, β, [0.9428090415820636 , - 0.32659863237109055 , - 0.42163702135578396 , 0.2138089935299396 ]) # u1(x) = (1-x)^2*(1+x)
91
+ P2 = plan_modifiedjac2jac (Float64, n, α, β, [0.9428090415820636 , - 0.32659863237109055 , - 0.42163702135578396 , 0.2138089935299396 ], [1.4142135623730951 ]) # u2(x) = (1-x)^2*(1+x)
92
+ P3 = plan_modifiedjac2jac (Float64, n, α, β, [- 0.9428090415820636 , 0.32659863237109055 , 0.42163702135578396 , - 0.2138089935299396 ], [- 5.185449728701348 , 0.0 , 0.42163702135578374 ]) # u3(x) = -(1-x)^2*(1+x), v3(x) = -(2-x)*(2+x)
93
+ P4 = plan_modifiedjac2jac (Float64, n, α+ 2 , β+ 1 , [1.1547005383792517 ], [4.387862045841156 , 0.1319657758147716 , - 0.20865621238292037 ]) # v4(x) = (2-x)*(2+x)
94
+
95
+ @test P1* I ≈ P2* I
96
+ @test P1\ I ≈ P2\ I
97
+ @test P3* I ≈ P2* (P4* I)
98
+ @test P3\ I ≈ P4\ (P2\ I)
99
+
100
+ P5 = plan_modifiedlag2lag (Float64, n, α, [2.0 , - 4.0 , 2.0 ]) # u5(x) = x^2
101
+ P6 = plan_modifiedlag2lag (Float64, n, α, [2.0 , - 4.0 , 2.0 ], [1.0 ]) # u6(x) = x^2
102
+ P7 = plan_modifiedlag2lag (Float64, n, α, [2.0 , - 4.0 , 2.0 ], [7.0 , - 7.0 , 2.0 ]) # u7(x) = x^2, v7(x) = (1+x)*(2+x)
103
+ P8 = plan_modifiedlag2lag (Float64, n, α+ 2 , [sqrt (2.0 )], [sqrt (1058.0 ), - sqrt (726.0 ), sqrt (48.0 )]) # v8(x) = (1+x)*(2+x)
104
+
105
+ @test P5* I ≈ P6* I
106
+ @test P5\ I ≈ P6\ I
107
+ @test P7* I ≈ P6* (P8* I)
108
+ @test P7\ I ≈ P8\ (P6\ I)
109
+
110
+ P9 = plan_modifiedherm2herm (Float64, n, [2.995504568550877 , 0.0 , 3.7655850551068593 , 0.0 , 1.6305461589167827 ], [2.995504568550877 , 0.0 , 3.7655850551068593 , 0.0 , 1.6305461589167827 ]) # u9(x) = 1+x^2+x^4, v9(x) = 1+x^2+x^4
111
+
112
+ @test P9* I ≈ P9\ I
113
+ end
114
+
88
115
function test_nd_plans (p, ps, pa, A)
89
116
B = copy (A)
90
117
C = ps* (p* A)
0 commit comments