Skip to content

Commit 0cb6e7d

Browse files
authored
SVector space in Chebyshev Dirichlet (#143)
1 parent 0cf2115 commit 0cb6e7d

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
1717
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1818
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1919
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
20+
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
2021
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2122

2223
[compat]

src/ApproxFunOrthogonalPolynomials.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ import SpecialFunctions: sinpi, cospi, airy, besselh,
9393
abs, sign, log, expm1, tan, abs2, sqrt, angle, max, min, cbrt, log,
9494
atan, acos, asin, erfc, inv
9595

96+
using StaticArrays: SVector
97+
9698
points(d::IntervalOrSegmentDomain{T},n::Integer) where {T} =
9799
fromcanonical.(Ref(d), chebyshevpoints(float(real(eltype(T))), n)) # eltype to handle point
98100
bary(v::AbstractVector{Float64},d::IntervalOrSegmentDomain,x::Float64) = bary(v,tocanonical(d,x))

src/Spaces/Chebyshev/ChebyshevOperators.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,14 @@ function getindex(op::ConcreteEvaluation{<:Chebyshev{DD,RR},typeof(rightendpoint
117117
scal!(cst,ret)
118118
end
119119

120+
convert_vector_or_svector(v::AbstractVector) = convert(Vector, v)
121+
convert_vector_or_svector(t::Tuple) = SVector(t)
122+
120123
@inline function _Dirichlet_Chebyshev(S, order)
121-
order == 0 && return ConcreteDirichlet(S,ArraySpace([ConstantSpace.(Point.(endpoints(domain(S))))...]),0)
124+
order == 0 && return ConcreteDirichlet(S,
125+
ArraySpace(convert_vector_or_svector(
126+
ConstantSpace.(Point.(endpoints(domain(S)))))),
127+
0)
122128
default_Dirichlet(S,order)
123129
end
124130
@static if VERSION >= v"1.8"

0 commit comments

Comments
 (0)