Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ContinuumArrays"
uuid = "7ae1f121-cc2c-504b-ac30-9b923412ae5c"
version = "0.7.4"
version = "0.7.5"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand Down
2 changes: 2 additions & 0 deletions src/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ end

_plotgrid(_, P) = grid(P)

_plotgrid(::WeightedBasisLayouts, wP) = plotgrid(unweightedbasis(wP))

plotgrid(g) = _plotgrid(MemoryLayout(g), g)

_split_svec(x) = (x,)
Expand Down
21 changes: 19 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ContinuumArrays, QuasiArrays, LazyArrays, IntervalSets, FillArrays, LinearAlgebra, BandedMatrices, FastTransforms, InfiniteArrays, Test, Base64, RecipesBase
import ContinuumArrays: ℵ₁, materialize, AffineQuasiVector, BasisLayout, AdjointBasisLayout, SubBasisLayout, ℵ₁,
MappedBasisLayout, AdjointMappedBasisLayout, MappedWeightedBasisLayout, TransformFactorization, Weight, WeightedBasisLayout, SubWeightedBasisLayout, WeightLayout,
Expansion, basis, invmap, Map, checkpoints
Expansion, basis, invmap, Map, checkpoints, _plotgrid
import QuasiArrays: SubQuasiArray, MulQuasiMatrix, Vec, Inclusion, QuasiDiagonal, LazyQuasiArrayApplyStyle, LazyQuasiArrayStyle
import LazyArrays: MemoryLayout, ApplyStyle, Applied, colsupport, arguments, ApplyLayout, LdivStyle, MulStyle

Expand Down Expand Up @@ -471,7 +471,7 @@ end
end

"""
This is a simple implementation of Chebyshev for testing. Use OrthogonalPolynomialsQuasi
This is a simple implementation of Chebyshev for testing. Use ClassicalOrthogonalPolynomials
for the real implementation.
"""
struct Chebyshev <: Basis{Float64}
Expand Down Expand Up @@ -611,4 +611,21 @@ include("test_basisconcat.jl")
rep = RecipesBase.apply_recipe(Dict{Symbol, Any}(), u)
@test rep[1].args == (L.points,u[L.points])
end

@testset "Chebyshev and weighted Chebyshev" begin
T = Chebyshev(10)
w = ChebyshevWeight()
wT = w .* T
x = axes(T, 1)

u = T * Vcat(rand(3), Zeros(7))
v = wT * Vcat(rand(3), Zeros(7))

rep = RecipesBase.apply_recipe(Dict{Symbol, Any}(), u)
@test rep[1].args == (grid(T), u[grid(T)])
wrep = RecipesBase.apply_recipe(Dict{Symbol, Any}(), v)
@test wrep[1].args == (grid(wT), v[grid(wT)])

@test plotgrid(v) == plotgrid(u) == grid(T) == grid(wT) == _plotgrid(MemoryLayout(v), v) == _plotgrid(MemoryLayout(u), u)
end
end