1
1
module ClassicalOrthogonalPolynomials
2
+ using LazyBandedMatrices: LazyBandedLayout
3
+ using InfiniteArrays: parentindices
2
4
using IntervalSets: UnitRange
3
5
using ContinuumArrays, QuasiArrays, LazyArrays, FillArrays, BandedMatrices, BlockArrays,
4
6
IntervalSets, DomainSets, ArrayLayouts, SpecialFunctions,
@@ -9,7 +11,7 @@ import Base: @_inline_meta, axes, getindex, convert, prod, *, /, \, +, -,
9
11
IndexStyle, IndexLinear, == , OneTo, tail, similar, copyto!, copy,
10
12
first, last, Slice, size, length, axes, IdentityUnitRange, sum, _sum, cumsum,
11
13
to_indices, _maybetail, tail, getproperty, inv, show, isapprox, summary
12
- import Base. Broadcast: materialize, BroadcastStyle, broadcasted
14
+ import Base. Broadcast: materialize, BroadcastStyle, broadcasted, Broadcasted
13
15
import LazyArrays: MemoryLayout, Applied, ApplyStyle, flatten, _flatten, colsupport, adjointlayout,
14
16
sub_materialize, arguments, sub_paddeddata, paddeddata, PaddedLayout, resizedata!, LazyVector, ApplyLayout, call,
15
17
_mul_arguments, CachedVector, CachedMatrix, LazyVector, LazyMatrix, axpy!, AbstractLazyLayout, BroadcastLayout,
@@ -31,7 +33,7 @@ import InfiniteArrays: OneToInf, InfAxes, Infinity, AbstractInfUnitRange, Infini
31
33
import ContinuumArrays: Basis, Weight, basis, @simplify , Identity, AbstractAffineQuasiVector, ProjectionFactorization,
32
34
inbounds_getindex, grid, plotgrid, transform, transform_ldiv, TransformFactorization, QInfAxes, broadcastbasis, Expansion,
33
35
AffineQuasiVector, AffineMap, WeightLayout, WeightedBasisLayout, WeightedBasisLayouts, demap, AbstractBasisLayout, BasisLayout,
34
- checkpoints, weight, unweightedbasis, MappedBasisLayouts, __sum
36
+ checkpoints, weight, unweightedbasis, MappedBasisLayouts, __sum, invmap
35
37
import FastTransforms: Λ, forwardrecurrence, forwardrecurrence!, _forwardrecurrence!, clenshaw, clenshaw!,
36
38
_forwardrecurrence_next, _clenshaw_next, check_clenshaw_recurrences, ChebyshevGrid, chebyshevpoints
37
39
@@ -45,7 +47,7 @@ export OrthogonalPolynomial, Normalized, orthonormalpolynomial, LanczosPolynomia
45
47
HermiteWeight, JacobiWeight, ChebyshevWeight, ChebyshevGrid, ChebyshevTWeight, ChebyshevUWeight, UltrasphericalWeight, LegendreWeight, LaguerreWeight,
46
48
WeightedUltraspherical, WeightedChebyshev, WeightedChebyshevT, WeightedChebyshevU, WeightedJacobi,
47
49
∞, Derivative, .. , Inclusion,
48
- chebyshevt, chebyshevu, legendre, jacobi,
50
+ chebyshevt, chebyshevu, legendre, jacobi, ultraspherical,
49
51
legendrep, jacobip, ultrasphericalc, laguerrel,hermiteh, normalizedjacobip,
50
52
jacobimatrix, jacobiweight, legendreweight, chebyshevtweight, chebyshevuweight, Weighted
51
53
@@ -241,6 +243,26 @@ function broadcasted(::LazyQuasiArrayStyle{2}, ::typeof(*), x::Inclusion, C::Sub
241
243
P[kr, :] * X
242
244
end
243
245
246
+
247
+ # function broadcasted(::LazyQuasiArrayStyle{2}, ::typeof(*), f::AbstractQuasiVector, C::SubQuasiArray{<:Any,2,<:Any,<:Tuple{<:AbstractAffineQuasiVector,<:Slice}})
248
+ # T = promote_type(eltype(f), eltype(C))
249
+ # axes(f,1) == axes(C,1) || throw(DimensionMismatch())
250
+ # P = parent(C)
251
+ # kr,jr = parentindices(C)
252
+ # (f[invmap(kr)] .* P)[kr,jr]
253
+ # end
254
+
255
+ # function broadcasted(::LazyQuasiArrayStyle{2}, ::typeof(*), f::AbstractQuasiVector, C::SubQuasiArray{<:Any,2,<:Any,<:Tuple{<:AbstractAffineQuasiVector,<:Any}})
256
+ # T = promote_type(eltype(f), eltype(C))
257
+ # axes(f,1) == axes(C,1) || throw(DimensionMismatch())
258
+ # P = parent(C)
259
+ # kr,jr = parentindices(C)
260
+ # (f[invmap(kr)] .* P)[kr,jr]
261
+ # end
262
+
263
+ broadcasted (:: LazyQuasiArrayStyle{2} , :: typeof (* ), f:: Broadcasted , C:: SubQuasiArray{<:Any,2,<:Any,<:Tuple{<:AbstractAffineQuasiVector,<:Any}} ) =
264
+ broadcast (* , materialize (f), C)
265
+
244
266
function jacobimatrix (C:: SubQuasiArray{T,2,<:Any,<:Tuple{AbstractAffineQuasiVector,Slice}} ) where T
245
267
P = parent (C)
246
268
kr,jr = parentindices (C)
0 commit comments