11using ContinuumArrays, QuasiArrays, LazyArrays, IntervalSets, FillArrays, LinearAlgebra, BandedMatrices, FastTransforms, InfiniteArrays, Test, Base64, RecipesBase
22import ContinuumArrays: ℵ₁, materialize, AffineQuasiVector, BasisLayout, AdjointBasisLayout, SubBasisLayout, ℵ₁,
33 MappedBasisLayout, AdjointMappedBasisLayout, MappedWeightedBasisLayout, TransformFactorization, Weight, WeightedBasisLayout, SubWeightedBasisLayout, WeightLayout,
4- Expansion, basis, invmap, Map, checkpoints
4+ Expansion, basis, invmap, Map, checkpoints, _plotgrid
55import QuasiArrays: SubQuasiArray, MulQuasiMatrix, Vec, Inclusion, QuasiDiagonal, LazyQuasiArrayApplyStyle, LazyQuasiArrayStyle
66import LazyArrays: MemoryLayout, ApplyStyle, Applied, colsupport, arguments, ApplyLayout, LdivStyle, MulStyle
77
471471end
472472
473473"""
474- This is a simple implementation of Chebyshev for testing. Use OrthogonalPolynomialsQuasi
474+ This is a simple implementation of Chebyshev for testing. Use ClassicalOrthogonalPolynomials
475475for the real implementation.
476476"""
477477struct Chebyshev <: Basis{Float64}
@@ -611,4 +611,21 @@ include("test_basisconcat.jl")
611611 rep = RecipesBase. apply_recipe (Dict {Symbol, Any} (), u)
612612 @test rep[1 ]. args == (L. points,u[L. points])
613613 end
614+
615+ @testset " Chebyshev and weighted Chebyshev" begin
616+ T = Chebyshev (10 )
617+ w = ChebyshevWeight ()
618+ wT = w .* T
619+ x = axes (T, 1 )
620+
621+ u = T * Vcat (rand (3 ), Zeros (7 ))
622+ v = wT * Vcat (rand (3 ), Zeros (7 ))
623+
624+ rep = RecipesBase. apply_recipe (Dict {Symbol, Any} (), u)
625+ @test rep[1 ]. args == (grid (T), u[grid (T)])
626+ wrep = RecipesBase. apply_recipe (Dict {Symbol, Any} (), v)
627+ @test wrep[1 ]. args == (grid (wT), v[grid (wT)])
628+
629+ @test plotgrid (v) == plotgrid (u) == grid (T) == grid (wT) == _plotgrid (MemoryLayout (v), v) == _plotgrid (MemoryLayout (u), u)
630+ end
614631end
0 commit comments