Skip to content

Commit 24efebd

Browse files
authored
rename isapproxinteger_addhalf to isapproxhalfoddinteger (#63)
1 parent 64c8d2a commit 24efebd

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

Project.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
name = "ApproxFunSingularities"
22
uuid = "f8fcb915-6b99-5be2-b79a-d6dbef8e6e7e"
3-
version = "0.3.10"
3+
version = "0.3.11"
44

55
[deps]
66
ApproxFunBase = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
77
ApproxFunOrthogonalPolynomials = "b70543e2-c0d9-56b8-a290-0d4d6d4de211"
88
DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf"
9+
HalfIntegers = "f0d1745a-41c9-11e9-1dd9-e5d34d218721"
910
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
1011
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
12+
OddEvenIntegers = "8d37c425-f37a-4ca2-9b9d-a61bc06559d2"
1113
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1214
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
1315
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
@@ -19,7 +21,9 @@ ApproxFunBaseTest = "0.1"
1921
ApproxFunOrthogonalPolynomials = "0.2.3, 0.3, 0.4, 0.5, 0.6"
2022
Aqua = "0.6"
2123
DomainSets = "0.4, 0.5, 0.6"
24+
HalfIntegers = "1.5"
2225
IntervalSets = "0.5, 0.6, 0.7"
26+
OddEvenIntegers = "0.1.8"
2327
Reexport = "0.2, 1"
2428
SpecialFunctions = "1, 2"
2529
StaticArrays = "1"

src/ApproxFunSingularities.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,16 @@ import Base: convert, getindex, *, /, ^,
4040

4141
using StaticArrays: SVector
4242

43+
using HalfIntegers
44+
using OddEvenIntegers
45+
46+
const HalfOddInteger{T<:Integer} = Half{Odd{T}}
47+
4348
strictconvert(::Type{T}, x) where {T} = convert(T, x)::T
4449

45-
isapproxinteger_addhalf(a) = isapproxinteger(a + 0.5)
46-
isapproxinteger_addhalf(::Integer) = false
50+
isapproxhalfoddinteger(a) = isapproxinteger(a + half(Odd(1)))
51+
isapproxhalfoddinteger(::HalfOddInteger) = true
52+
isapproxhalfoddinteger(::Integer) = false
4753

4854
isequalminhalf(x) = x == -0.5
4955
isequalminhalf(::Integer) = false

src/JacobiWeightOperators.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ for (Func,Len,Sum) in ((:DefiniteIntegral,:complexlength,:sum),(:DefiniteLineInt
431431
function bandwidths::$ConcFunc{<:JacobiWeight{<:Ultraspherical{<:Any,D,R},D,R}}) where {D<:IntervalOrSegment,R}
432432
λ = order(domainspace(Σ).space)
433433
β,α = domainspace(Σ).β,domainspace(Σ).α
434-
if isapproxinteger_addhalf-λ) && β==α && λ ceil(Int,β)
434+
if isapproxhalfoddinteger-λ) && β==α && λ ceil(Int,β)
435435
0,2*(ceil(Int,β)-λ)
436436
else
437437
0,∞
@@ -466,7 +466,7 @@ for (Func,Len,Sum) in ((:DefiniteIntegral,:complexlength,:sum),(:DefiniteLineInt
466466

467467
function bandwidths::$ConcFunc{<:JacobiWeight{Chebyshev{D,R},D,R}}) where {D<:IntervalOrSegment,R}
468468
β,α = domainspace(Σ).β,domainspace(Σ).α
469-
if isapproxinteger_addhalf(β) && β==α && 0 ceil(Int,β)
469+
if isapproxhalfoddinteger(β) && β==α && 0 ceil(Int,β)
470470
0,2ceil(Int,β)
471471
else
472472
0,∞

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ end
490490
@test ApproxFunBase.rowstop(B,1) == 1
491491
B[1] == arclength(domain(S))
492492
f = Fun(exp, S)
493-
B*f == sum(Fun(exp,domain(S)))
493+
@test convert(Number, B*f) sum(Fun(exp,domain(S)))
494494
end
495495
end
496496
end

0 commit comments

Comments
 (0)