Skip to content

Commit 441f970

Browse files
authored
Speed-up Chebyshev ldirichlet indexing (#266)
* Speed-up Chebyshev ldirichlet indexing * use isodd instead of iseven
1 parent 5f888ea commit 441f970

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunOrthogonalPolynomials"
22
uuid = "b70543e2-c0d9-56b8-a290-0d4d6d4de211"
3-
version = "0.6.34"
3+
version = "0.6.35"
44

55
[deps]
66
ApproxFunBase = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"

src/Spaces/Chebyshev/ChebyshevOperators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function _getindex_eval_leftendpoint(op::ConcreteEvaluation{<:Chebyshev{<:Interv
8484

8585
ret = Array{T}(undef, n)
8686
for (ind, j) in enumerate(k)
87-
ret[ind]=(-1)^(p+1)*(-one(T))^j
87+
ret[ind] = iseven(p+j) ? -1 : 1
8888
end
8989

9090
for m in 0:p-1

0 commit comments

Comments
 (0)