1
1
using ContinuumArrays, QuasiArrays, LazyArrays, IntervalSets, FillArrays, LinearAlgebra, BandedMatrices, FastTransforms, InfiniteArrays, Test, Base64, RecipesBase
2
2
import ContinuumArrays: ℵ₁, materialize, AffineQuasiVector, BasisLayout, AdjointBasisLayout, SubBasisLayout, ℵ₁,
3
3
MappedBasisLayout, AdjointMappedBasisLayout, MappedWeightedBasisLayout, TransformFactorization, Weight, WeightedBasisLayout, SubWeightedBasisLayout, WeightLayout,
4
- Expansion, basis, invmap, Map, checkpoints
4
+ Expansion, basis, invmap, Map, checkpoints, _plotgrid
5
5
import QuasiArrays: SubQuasiArray, MulQuasiMatrix, Vec, Inclusion, QuasiDiagonal, LazyQuasiArrayApplyStyle, LazyQuasiArrayStyle
6
6
import LazyArrays: MemoryLayout, ApplyStyle, Applied, colsupport, arguments, ApplyLayout, LdivStyle, MulStyle
7
7
471
471
end
472
472
473
473
"""
474
- This is a simple implementation of Chebyshev for testing. Use OrthogonalPolynomialsQuasi
474
+ This is a simple implementation of Chebyshev for testing. Use ClassicalOrthogonalPolynomials
475
475
for the real implementation.
476
476
"""
477
477
struct Chebyshev <: Basis{Float64}
@@ -611,4 +611,21 @@ include("test_basisconcat.jl")
611
611
rep = RecipesBase. apply_recipe (Dict {Symbol, Any} (), u)
612
612
@test rep[1 ]. args == (L. points,u[L. points])
613
613
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
614
631
end
0 commit comments