Skip to content

Commit 43f10bc

Browse files
authored
Use Clenshaw for weighted OPs (#148)
1 parent 40752c1 commit 43f10bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/clenshaw.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ Base.@propagate_inbounds function getindex(f::Mul{<:AbstractOPLayout,<:PaddedLay
115115
unsafe_getindex(f, x, j...)
116116
end
117117

118+
Base.@propagate_inbounds getindex(f::Mul{<:WeightedOPLayout,<:PaddedLayout}, x::Number, j...) =
119+
weight(f.A)[x] * (unweighted(f.A) * f.B)[x, j...]
120+
118121
###
119122
# Operator clenshaw
120123
###

0 commit comments

Comments
 (0)