@@ -30,14 +30,14 @@ import QuasiArrays: cardinality, checkindex, QuasiAdjoint, QuasiTranspose, Inclu
3030 ApplyQuasiArray, ApplyQuasiMatrix, LazyQuasiArrayApplyStyle, AbstractQuasiArrayApplyStyle,
3131 LazyQuasiArray, LazyQuasiVector, LazyQuasiMatrix, LazyLayout, LazyQuasiArrayStyle,
3232 _getindex, layout_getindex, _factorize, AbstractQuasiArray, AbstractQuasiMatrix, AbstractQuasiVector,
33- AbstractQuasiFill, _equals , QuasiArrayLayout, PolynomialLayout, diff_layout
33+ AbstractQuasiFill, equals_layout , QuasiArrayLayout, PolynomialLayout, diff_layout
3434
3535import InfiniteArrays: OneToInf, InfAxes, Infinity, AbstractInfUnitRange, InfiniteCardinal, InfRanges
3636import InfiniteLinearAlgebra: chop!, chop, pad, choplength, compatible_resize!
3737import ContinuumArrays: Basis, Weight, basis_axes, @simplify , Identity, AbstractAffineQuasiVector, ProjectionFactorization,
38- grid, plotgrid, _plotgrid, _grid , transform_ldiv, TransformFactorization, QInfAxes, broadcastbasis, ExpansionLayout, basismap,
38+ grid, plotgrid, plotgrid_layout, plotvalues_layout, grid_layout , transform_ldiv, TransformFactorization, QInfAxes, broadcastbasis, ExpansionLayout, basismap,
3939 AffineQuasiVector, AffineMap, AbstractWeightLayout, AbstractWeightedBasisLayout, WeightedBasisLayout, WeightedBasisLayouts, demap, AbstractBasisLayout, BasisLayout,
40- checkpoints, weight, unweighted, MappedBasisLayouts, sum_layout, invmap, plan_ldiv, layout_broadcasted, MappedBasisLayout, SubBasisLayout, _broadcastbasis ,
40+ checkpoints, weight, unweighted, MappedBasisLayouts, sum_layout, invmap, plan_ldiv, layout_broadcasted, MappedBasisLayout, SubBasisLayout, broadcastbasis_layout ,
4141 plan_transform, plan_grid_transform, MAX_PLOT_POINTS, MulPlan, grammatrix, AdjointBasisLayout, grammatrix_layout
4242import FastTransforms: Λ, forwardrecurrence, forwardrecurrence!, _forwardrecurrence!, clenshaw, clenshaw!,
4343 _forwardrecurrence_next, _clenshaw_next, check_clenshaw_recurrences, ChebyshevGrid, chebyshevpoints, Plan, ScaledPlan, th_cheb2leg
8787isorthogonalityweighted (wS) = isorthogonalityweighted (MemoryLayout (wS), wS)
8888
8989
90- _equals (:: MappedOPLayout , :: MappedOPLayout , P, Q) = demap (P) == demap (Q) && basismap (P) == basismap (Q)
91- _equals (:: MappedOPLayout , :: MappedBasisLayouts , P, Q) = demap (P) == demap (Q) && basismap (P) == basismap (Q)
92- _equals (:: MappedBasisLayouts , :: MappedOPLayout , P, Q) = demap (P) == demap (Q) && basismap (P) == basismap (Q)
90+ equals_layout (:: MappedOPLayout , :: MappedOPLayout , P, Q) = demap (P) == demap (Q) && basismap (P) == basismap (Q)
91+ equals_layout (:: MappedOPLayout , :: MappedBasisLayouts , P, Q) = demap (P) == demap (Q) && basismap (P) == basismap (Q)
92+ equals_layout (:: MappedBasisLayouts , :: MappedOPLayout , P, Q) = demap (P) == demap (Q) && basismap (P) == basismap (Q)
9393
94- _broadcastbasis (:: typeof (+ ), :: MappedOPLayout , :: MappedOPLayout , P, Q) = _broadcastbasis (+ , MappedBasisLayout (), MappedBasisLayout (), P, Q)
95- _broadcastbasis (:: typeof (+ ), :: MappedOPLayout , M:: MappedBasisLayout , P, Q) = _broadcastbasis (+ , MappedBasisLayout (), M, P, Q)
96- _broadcastbasis (:: typeof (+ ), L:: MappedBasisLayout , :: MappedOPLayout , P, Q) = _broadcastbasis (+ , L, MappedBasisLayout (), P, Q)
94+ broadcastbasis_layout (:: typeof (+ ), :: MappedOPLayout , :: MappedOPLayout , P, Q) = broadcastbasis_layout (+ , MappedBasisLayout (), MappedBasisLayout (), P, Q)
95+ broadcastbasis_layout (:: typeof (+ ), :: MappedOPLayout , M:: MappedBasisLayout , P, Q) = broadcastbasis_layout (+ , MappedBasisLayout (), M, P, Q)
96+ broadcastbasis_layout (:: typeof (+ ), L:: MappedBasisLayout , :: MappedOPLayout , P, Q) = broadcastbasis_layout (+ , L, MappedBasisLayout (), P, Q)
9797sum_layout (:: MappedOPLayout , A, dims) = sum_layout (MappedBasisLayout (), A, dims)
9898
9999# demap to avoid Golub-Welsch fallback
100100ContinuumArrays. transform_ldiv_if_columns (L:: Ldiv{MappedOPLayout,Lay} , ax:: OneTo ) where Lay = ContinuumArrays. transform_ldiv_if_columns (Ldiv {MappedBasisLayout,Lay} (L. A,L. B), ax)
101101ContinuumArrays. transform_ldiv_if_columns (L:: Ldiv{MappedOPLayout,ApplyLayout{typeof(hcat)}} , ax:: OneTo ) = ContinuumArrays. transform_ldiv_if_columns (Ldiv {MappedBasisLayout,UnknownLayout} (L. A,L. B), ax)
102102
103- _equals (:: AbstractOPLayout , :: AbstractWeightedBasisLayout , _, _) = false # Weighted-Legendre doesn't exist
104- _equals (:: AbstractWeightedBasisLayout , :: AbstractOPLayout , _, _) = false # Weighted-Legendre doesn't exist
103+ equals_layout (:: AbstractOPLayout , :: AbstractWeightedBasisLayout , _, _) = false # Weighted-Legendre doesn't exist
104+ equals_layout (:: AbstractWeightedBasisLayout , :: AbstractOPLayout , _, _) = false # Weighted-Legendre doesn't exist
105105
106- _equals (:: WeightedOPLayout , :: WeightedOPLayout , wP, wQ) = unweighted (wP) == unweighted (wQ)
107- _equals (:: WeightedOPLayout , :: WeightedBasisLayout , wP, wQ) = unweighted (wP) == unweighted (wQ) && weight (wP) == weight (wQ)
108- _equals (:: WeightedBasisLayout , :: WeightedOPLayout , wP, wQ) = unweighted (wP) == unweighted (wQ) && weight (wP) == weight (wQ)
109- _equals (:: WeightedBasisLayout{<:AbstractOPLayout} , :: WeightedBasisLayout{<:AbstractOPLayout} , wP, wQ) = unweighted (wP) == unweighted (wQ) && weight (wP) == weight (wQ)
106+ equals_layout (:: WeightedOPLayout , :: WeightedOPLayout , wP, wQ) = unweighted (wP) == unweighted (wQ)
107+ equals_layout (:: WeightedOPLayout , :: WeightedBasisLayout , wP, wQ) = unweighted (wP) == unweighted (wQ) && weight (wP) == weight (wQ)
108+ equals_layout (:: WeightedBasisLayout , :: WeightedOPLayout , wP, wQ) = unweighted (wP) == unweighted (wQ) && weight (wP) == weight (wQ)
109+ equals_layout (:: WeightedBasisLayout{<:AbstractOPLayout} , :: WeightedBasisLayout{<:AbstractOPLayout} , wP, wQ) = unweighted (wP) == unweighted (wQ) && weight (wP) == weight (wQ)
110110
111111
112112copy (L:: Ldiv{MappedOPLayout,Lay} ) where Lay<: MappedBasisLayouts = copy (Ldiv {MappedBasisLayout,Lay} (L. A,L. B))
@@ -255,10 +255,11 @@ _tritrunc(X, n) = _tritrunc(MemoryLayout(X), X, n)
255255jacobimatrix (V:: SubQuasiArray{<:Any,2,<:Any,<:Tuple{Inclusion,OneTo}} ) =
256256 _tritrunc (jacobimatrix (parent (V)), maximum (parentindices (V)[2 ]))
257257
258- _grid (:: AbstractOPLayout , P, n:: Integer ) = eigvals (symtridiagonalize (jacobimatrix (P[:,OneTo (n)])))
259- _grid (:: MappedOPLayout , P, n:: Integer ) = _grid (MappedBasisLayout (), P, n)
260- _plotgrid (:: AbstractOPLayout , P, n:: Integer ) = grid (P, min (40 n, MAX_PLOT_POINTS))
261- _plotgrid (:: MappedOPLayout , P, n:: Integer ) = _plotgrid (MappedBasisLayout (), P, n)
258+ grid_layout (:: AbstractOPLayout , P, n:: Integer ) = eigvals (symtridiagonalize (jacobimatrix (P[:,OneTo (n)])))
259+ grid_layout (:: MappedOPLayout , P, n:: Integer ) = grid_layout (MappedBasisLayout (), P, n)
260+ plotgrid_layout (:: AbstractOPLayout , P, n:: Integer ) = grid (P, min (40 n, MAX_PLOT_POINTS))
261+ plotgrid_layout (:: MappedOPLayout , P, n:: Integer ) = plotgrid_layout (MappedBasisLayout (), P, n)
262+ plotvalues_layout (:: ExpansionLayout{MappedOPLayout} , f, x... ) = plotvalues_layout (ExpansionLayout {MappedBasisLayout} (), f, x... )
262263
263264function golubwelsch (X)
264265 D, V = eigen (symtridiagonalize (X)) # Eigenvalue decomposition
0 commit comments