11using 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
33import LazyArrays: AbstractCachedMatrix, resizedata!
44
55@testset " CholeskyQR" begin
@@ -228,7 +228,7 @@ import LazyArrays: AbstractCachedMatrix, resizedata!
228228 @test Q == Q̃
229229 @test Q̃ == Q
230230
231- @test Q[0.1 ,1 ] ≈ 1 / sqrt (2 )
231+ @test Q[0.1 ,1 ] ≈ _p0 (Q) ≈ 1 / sqrt (2 )
232232 @test Q[0.1 ,1 : 10 ] ≈ Q̃[0.1 ,1 : 10 ]
233233 @test Q[0.1 ,10_000 ] ≈ Q̃[0.1 ,10_000 ]
234234
@@ -246,6 +246,9 @@ import LazyArrays: AbstractCachedMatrix, resizedata!
246246 @testset " Chebyshev" begin
247247 U = ChebyshevU ()
248248 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 ))))
249252 @test bandwidths (Q\ U) == (0 ,2 )
250253
251254 Q̃ = OrthogonalPolynomial (x -> (1 + x^ 2 )* sqrt (1 - x^ 2 ), U)
0 commit comments