1
1
using Test, ClassicalOrthogonalPolynomials, BandedMatrices, LinearAlgebra, LazyArrays, ContinuumArrays, LazyBandedMatrices, InfiniteLinearAlgebra
2
- import ClassicalOrthogonalPolynomials: cholesky_jacobimatrix, qr_jacobimatrix, orthogonalpolynomial
2
+ import ClassicalOrthogonalPolynomials: cholesky_jacobimatrix, qr_jacobimatrix, orthogonalpolynomial, _p0
3
3
import LazyArrays: AbstractCachedMatrix, resizedata!
4
4
5
5
@testset " CholeskyQR" begin
@@ -228,7 +228,7 @@ import LazyArrays: AbstractCachedMatrix, resizedata!
228
228
@test Q == Q̃
229
229
@test Q̃ == Q
230
230
231
- @test Q[0.1 ,1 ] ≈ 1 / sqrt (2 )
231
+ @test Q[0.1 ,1 ] ≈ _p0 (Q) ≈ 1 / sqrt (2 )
232
232
@test Q[0.1 ,1 : 10 ] ≈ Q̃[0.1 ,1 : 10 ]
233
233
@test Q[0.1 ,10_000 ] ≈ Q̃[0.1 ,10_000 ]
234
234
@@ -246,6 +246,9 @@ import LazyArrays: AbstractCachedMatrix, resizedata!
246
246
@testset " Chebyshev" begin
247
247
U = ChebyshevU ()
248
248
Q = orthogonalpolynomial (x -> (1 + x^ 2 )* sqrt (1 - x^ 2 ), U)
249
+ x = axes (U,1 )
250
+
251
+ @test Q[0.1 ,1 ] ≈ _p0 (Q) ≈ 1 / sqrt (sum (expand (Weighted (U),x -> (1 + x^ 2 )* sqrt (1 - x^ 2 ))))
249
252
@test bandwidths (Q\ U) == (0 ,2 )
250
253
251
254
Q̃ = OrthogonalPolynomial (x -> (1 + x^ 2 )* sqrt (1 - x^ 2 ), U)
0 commit comments