Skip to content

Commit 2ad9378

Browse files
authored
Speed up ChebyshevDirichlet leftendpoint indexing (#267)
1 parent 441f970 commit 2ad9378

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Spaces/Ultraspherical/DirichletSpace.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function _getindex_eval_leftendpoint(B::ConcreteEvaluation{<:ChebyshevDirichlet{
191191
S = Space(domain(B))
192192

193193
if B.order == 0
194-
eltype(B)[k==1 ? 1.0 : -(-1)^k*2.0 for k=kr]
194+
eltype(B)[k==1 ? 1.0 : (iseven(k) ? -2.0 : 2.0) for k=kr]
195195
else
196196
_getindex_default(B, x, kr)
197197
end

0 commit comments

Comments
 (0)