@@ -164,4 +164,74 @@ using ApproxFunOrthogonalPolynomials, ApproxFunBase, Test, StaticArrays, Special
164
164
space (reverseorientation (f))
165
165
@test f (0.1 ) ≈ (R* f)(0.1 ) ≈ reverseorientation (f)(0.1 )
166
166
end
167
+
168
+ @testset " Full Jacobi" begin
169
+ sp = Jacobi (.5 ,2.124 )
170
+ f = Fun (exp,sp)
171
+ sp2 = Jacobi (1.5 ,2.124 )
172
+ M = Multiplication (f,sp2)
173
+ @time testbandedoperator (M)
174
+
175
+
176
+ # # Legendre conversions
177
+ testspace (Ultraspherical (1 ); haslineintegral= false )
178
+ testspace (Ultraspherical (2 ); haslineintegral= false )
179
+ # minpoints is a tempory fix a bug
180
+ @time testspace (Ultraspherical (1 // 2 ); haslineintegral= false , minpoints= 2 )
181
+ @test norm (Fun (exp,Ultraspherical (1 // 2 ))- Fun (exp,Jacobi (0 ,0 ))) < 100 eps ()
182
+
183
+ C= Conversion (Jacobi (0 ,0 ),Chebyshev ())
184
+ @time testbandedbelowoperator (C)
185
+ @test norm (C* Fun (exp,Jacobi (0 ,0 )) - Fun (exp)) < 100 eps ()
186
+
187
+
188
+ C= Conversion (Ultraspherical (1 // 2 ),Chebyshev ())
189
+ @time testbandedbelowoperator (C)
190
+ @test norm (C* Fun (exp,Ultraspherical (1 // 2 )) - Fun (exp)) < 100 eps ()
191
+
192
+
193
+
194
+ C= Conversion (Chebyshev (),Ultraspherical (1 // 2 ))
195
+ @time testbandedbelowoperator (C)
196
+ @test norm (C* Fun (exp)- Fun (exp,Legendre ())) < 100 eps ()
197
+
198
+
199
+ C= Conversion (Chebyshev (),Jacobi (0 ,0 ))
200
+ @time testbandedbelowoperator (C)
201
+ @test norm (C* Fun (exp) - Fun (exp,Jacobi (0 ,0 ))) < 100 eps ()
202
+
203
+
204
+ C= Conversion (Chebyshev (),Jacobi (1 ,1 ))
205
+ @time testbandedbelowoperator (C)
206
+ @test norm (C* Fun (exp) - Fun (exp,Jacobi (1 ,1 ))) < 100 eps ()
207
+
208
+
209
+ C= Conversion (Ultraspherical (1 // 2 ),Ultraspherical (1 ))
210
+ @time testbandedbelowoperator (C)
211
+
212
+ λ1 = ApproxFunOrthogonalPolynomials. order (domainspace (C))
213
+ λ2 = ApproxFunOrthogonalPolynomials. order (rangespace (C))
214
+
215
+ # test against version that doesn't use lgamma
216
+ Cex = Float64[(if j ≥ k && iseven (k- j)
217
+ gamma (λ2)* (k- 1 + λ2)/ (gamma (λ1)* gamma (λ1- λ2))*
218
+ (gamma ((j- k)/ 2 + λ1- λ2)/ gamma ((j- k)/ 2 + 1 ))*
219
+ (gamma ((k+ j- 2 )/ 2 + λ1)/ gamma ((k+ j- 2 )/ 2 + λ2+ 1 ))
220
+ else
221
+ 0.0
222
+ end ) for k= 1 : 20 ,j= 1 : 20 ]
223
+
224
+ @test norm (Cex - C[1 : 20 ,1 : 20 ]) < 100 eps ()
225
+
226
+ @test norm (C* Fun (exp,Ultraspherical (1 // 2 ))- Fun (exp,Ultraspherical (1 ))) < 100 eps ()
227
+
228
+ C= Conversion (Jacobi (0 ,0 ),Ultraspherical (1 ))
229
+ testbandedbelowoperator (C)
230
+ @test norm (C* Fun (exp,Jacobi (0 ,0 ))- Fun (exp,Ultraspherical (1 ))) < 100 eps ()
231
+
232
+
233
+ C= Conversion (Ultraspherical (1 ),Jacobi (0 ,0 ))
234
+ testbandedbelowoperator (C)
235
+ @test norm (C* Fun (exp,Ultraspherical (1 ))- Fun (exp,Jacobi (0 ,0 ))) < 100 eps ()
236
+ end
167
237
end
0 commit comments