Skip to content

Commit e9e84ad

Browse files
authored
Release 0.9 (#518)
* Drop support for Julia versions below v1.9 (#513) * Remove Test as a dependency (#514) * Remove InfiniteLinearAlgebra dependency (#510) * Remove explicit dependency on InfiniteLinearAlgebra * bump version to v0.8.46 * Make constant propagation unconditional (#515) * Remove Vec (#517)
1 parent 1fa9f99 commit e9e84ad

File tree

13 files changed

+38
-388
lines changed

13 files changed

+38
-388
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
fail-fast: false
4040
matrix:
4141
version:
42-
- '1.6'
4342
- '1'
4443
- '~1.10.0-0'
4544
os:

.github/workflows/downstream.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
fail-fast: true
3333
matrix:
34-
julia-version: ['1', '1.6']
34+
julia-version: ['1']
3535
os: [ubuntu-latest]
3636
package:
3737
- {repo: ApproxFun.jl, group: JuliaApproximation}

ApproxFunBaseTest/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1414
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1515

1616
[compat]
17-
ApproxFunBase = "0.5, 0.6, 0.7, 0.8"
17+
ApproxFunBase = "0.5, 0.6, 0.7, 0.8, 0.9"
1818
BandedMatrices = "0.16, 0.17"
1919
BlockArrays = "0.14, 0.15, 0.16"
2020
BlockBandedMatrices = "0.10, 0.11, 0.12"

Project.toml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.8.46"
3+
version = "0.9.0"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
@@ -15,7 +15,6 @@ DualNumbers = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74"
1515
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
1616
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
1717
InfiniteArrays = "4858937d-0d70-526a-a4dd-2d5cb5dd786c"
18-
InfiniteLinearAlgebra = "cde9dba0-b1de-11e9-2c62-0bab9446c55c"
1918
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
2019
LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
2120
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -24,7 +23,6 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
2423
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
2524
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
2625
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
27-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2826

2927
[compat]
3028
AbstractFFTs = "0.5, 1"
@@ -39,20 +37,20 @@ DomainSets = "0.5, 0.6"
3937
DualNumbers = "0.6.2"
4038
FFTW = "0.3, 1"
4139
FillArrays = "0.11, 0.12, 0.13, 1"
42-
InfiniteArrays = "0.11, 0.12, 0.13"
43-
InfiniteLinearAlgebra = "0.5, 0.6"
40+
InfiniteArrays = "0.13"
4441
Infinities = "0.1"
4542
IntervalSets = "0.5, 0.6, 0.7"
4643
LazyArrays = "0.20, 0.21, 0.22, 1"
4744
LowRankMatrices = "1"
4845
SpecialFunctions = "0.10, 1.0, 2"
4946
StaticArrays = "0.12, 1.0"
50-
julia = "1.6"
47+
julia = "1.9"
5148

5249
[extras]
5350
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
5451
Infinities = "e1ba4f0e-776d-440f-acd9-e1d2e9742647"
5552
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
53+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
5654

5755
[targets]
58-
test = ["Aqua", "Random", "Infinities"]
56+
test = ["Aqua", "Random", "Infinities", "Test"]

src/ApproxFunBase.jl

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ using AbstractFFTs
44
using BandedMatrices
55
using BlockArrays
66
using BlockBandedMatrices
7+
import Calculus
8+
import Combinatorics: multiexponents
79
using DSP
810
using DomainSets
911
using DualNumbers
1012
using FFTW
1113
using FillArrays
1214
using InfiniteArrays
13-
using InfiniteLinearAlgebra
1415
using IntervalSets
1516
using LinearAlgebra
1617
using LowRankMatrices
1718
using SparseArrays
1819
using SpecialFunctions
19-
20-
import Calculus
2120
using StaticArrays: SVector, @SArray, SArray
21+
import Statistics: mean
2222

2323
import DomainSets: Domain, indomain, UnionDomain, ProductDomain, Point, ∂,
2424
SetdiffDomain, Interval, ChebyshevInterval, boundary,
@@ -52,10 +52,6 @@ import Base: values, convert, getindex, setindex!, *, +, -, ==, <, <=, >, |, !,
5252
import Base.Broadcast: BroadcastStyle, Broadcasted, AbstractArrayStyle,
5353
broadcastable, DefaultArrayStyle, broadcasted
5454

55-
import Statistics: mean
56-
57-
import Combinatorics: multiexponents
58-
5955
import LinearAlgebra: BlasInt, BlasFloat, norm, ldiv!, mul!, det, cross,
6056
qr, qr!, rank, isdiag, istril, istriu, issymmetric,
6157
Tridiagonal, diagm, diagm_container, factorize,
@@ -105,8 +101,6 @@ import DomainSets: dimension
105101

106102
import IntervalSets: (..), endpoints
107103

108-
const Vec{d,T} = SVector{d,T}
109-
110104
export pad!, pad, chop!, sample,
111105
complexroots, roots,
112106
reverseorientation
@@ -164,7 +158,6 @@ include("PDE/PDE.jl")
164158
include("Spaces/Spaces.jl")
165159
include("eigen.jl")
166160
include("hacks.jl")
167-
include("testing.jl")
168161
include("specialfunctions.jl")
169162
include("show.jl")
170163

src/Fun.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -594,12 +594,7 @@ end
594594

595595
\(c::Number, f::Fun) = Fun(f.space, c \ f.coefficients)
596596

597-
@static if VERSION >= v"1.8"
598-
Base.@constprop :aggressive intpow(f::Fun, k::Integer) = _intpow(f, k)
599-
else
600-
intpow(f::Fun, k::Integer) = _intpow(f, k)
601-
end
602-
@inline function _intpow(f, k)
597+
Base.@constprop :aggressive function intpow(f, k)
603598
if k == 0
604599
ones(cfstype(f), space(f))
605600
elseif k==1

src/Multivariate/TensorSpace.jl

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -358,21 +358,14 @@ Space(sp::ProductDomain) = TensorSpace(sp)
358358
setdomain(sp::TensorSpace, d::ProductDomain) = TensorSpace(setdomain.(factors(sp), factors(d)))
359359

360360
*(A::Space, B::Space) = A B
361-
@inline function _powspace(A, p)
361+
Base.@constprop :aggressive function ^(A::Space, p::Integer)
362362
p >= 1 || throw(ArgumentError("exponent must be >= 1, received $p"))
363363
# Enumerate common cases to help with constant propagation
364364
p == 1 ? A :
365365
p == 2 ? A * A :
366366
p == 3 ? A * A * A :
367367
foldl(*, ntuple(_ -> A, p))
368368
end
369-
@static if VERSION >= v"1.8"
370-
Base.@constprop :aggressive function ^(A::Space, p::Integer)
371-
_powspace(A, p)
372-
end
373-
else
374-
^(A::Space, p::Integer) = _powspace(A, p)
375-
end
376369

377370

378371
## TODO: generalize

src/Operators/banded/CalculusOperator.jl

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ end
191191

192192

193193
## Map to canonical
194-
@inline function _DefaultDerivative(sp::Space, k::Number)
194+
Base.@constprop :aggressive function DefaultDerivative(sp::Space, k::Number)
195195
assert_integer(k)
196196
if nameof(typeof(canonicaldomain(sp))) == nameof(typeof(domain(sp)))
197197
# this is the normal default constructor
@@ -222,19 +222,7 @@ end
222222
end
223223
end
224224

225-
@static if VERSION >= v"1.8"
226-
for f in (:DefaultDerivative, :DefaultIntegral)
227-
_f = Symbol(:_, f)
228-
@eval Base.@constprop :aggressive $f(sp::Space, k::Number) = $_f(sp, k)
229-
end
230-
else
231-
for f in (:DefaultDerivative, :DefaultIntegral)
232-
_f = Symbol(:_, f)
233-
@eval $f(sp::Space, k::Number) = $_f(sp, k)
234-
end
235-
end
236-
237-
@inline function _DefaultIntegral(sp::Space, k::Number)
225+
Base.@constprop :aggressive function DefaultIntegral(sp::Space, k::Number)
238226
assert_integer(k)
239227
if nameof(typeof(canonicaldomain(sp))) == nameof(typeof(domain(sp)))
240228
# this is the normal default constructor

src/Operators/general/CachedOperator.jl

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,7 @@ CachedOperator(op::Operator,data::AbstractMatrix,sz::Tuple{Int,Int},pd=false) =
2424
CachedOperator(op::Operator,data::AbstractMatrix,padding=false) = CachedOperator(op,data,size(data),padding)
2525

2626

27-
@static if VERSION >= v"1.8"
28-
Base.@constprop :aggressive function default_CachedOperator(op::Operator;padding::Bool=false)
29-
_default_CachedOperator(op, padding)
30-
end
31-
else
32-
function default_CachedOperator(op::Operator;padding::Bool=false)
33-
_default_CachedOperator(op, padding)
34-
end
35-
end
36-
@inline function _default_CachedOperator(op::Operator, padding)
27+
Base.@constprop :aggressive function default_CachedOperator(op::Operator; padding::Bool=false)
3728
if isbanded(op)
3829
CachedOperator(BandedMatrix, op; padding=padding)
3930
elseif isbandedblockbanded(op) && !padding

src/Operators/general/InterlaceOperator.jl

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ end
9090
const VectorInterlaceOperator = InterlaceOperator{T,1,DS,RS} where {T,DS,RS<:Space{D,R}} where {D,R<:AbstractVector}
9191
const MatrixInterlaceOperator = InterlaceOperator{T,2,DS,RS} where {T,DS,RS<:Space{D,R}} where {D,R<:AbstractVector}
9292

93-
@static if VERSION >= v"1.8"
94-
Base.@constprop :aggressive interlace_bandwidths(args...) = _interlace_bandwidths(args...)
95-
else
96-
interlace_bandwidths(args...) = _interlace_bandwidths(args...)
97-
end
98-
9993
__interlace_ops_bandwidths(ops::AbstractMatrix) = bandwidths.(ops)
10094
__interlace_ops_bandwidths(ops::Diagonal) = bandwidths.(parent(ops))
10195
function __interlace_bandwidths_square(ops::AbstractMatrix, bw = __interlace_ops_bandwidths(ops))
@@ -119,8 +113,11 @@ function __interlace_bandwidths_square(ops::Diagonal, bw = __interlace_ops_bandw
119113
l,u
120114
end
121115

122-
@inline function _interlace_bandwidths(ops::AbstractMatrix{<:Operator}, ds, rs,
123-
allbanded = all(isbanded,ops), bw = allbanded ? __interlace_ops_bandwidths(ops) : nothing)
116+
Base.@constprop :aggressive function interlace_bandwidths(ops::AbstractMatrix{<:Operator},
117+
ds, rs,
118+
allbanded = all(isbanded, ops),
119+
bw = allbanded ? __interlace_ops_bandwidths(ops) : nothing)
120+
124121
p=size(ops,1)
125122
dsi = interlacer(ds)
126123
rsi = interlacer(rs)
@@ -159,7 +156,7 @@ function InterlaceOperator(ops::AbstractMatrix{<:Operator},ds::Space,rs::Space;
159156
israggedbelow)
160157
end
161158

162-
@inline function _interlace_bandwidths(ops::VectorOrTupleOfOp, ds, rs, allbanded = all(isbanded, ops))
159+
Base.@constprop :aggressive function interlace_bandwidths(ops::VectorOrTupleOfOp, ds, rs, allbanded = all(isbanded, ops))
163160
p=size(ops,1)
164161
ax1 = first(axes(ops))
165162
if allbanded
@@ -210,19 +207,10 @@ function InterlaceOperator(opsin::AbstractVector{<:Operator})
210207
ops = convert_vector(promotedomainspace(opsin))
211208
InterlaceOperator(ops, domainspace(first(ops)), rangespace(ops))
212209
end
213-
@inline function _InterlaceOperator(opsin, promotedomain)
210+
Base.@constprop :aggressive function InterlaceOperator(opsin, promotedomain = true)
214211
ops = promotedomain ? promotedomainspace(opsin) : opsin
215212
InterlaceOperator(ops, domainspace(first(ops)), rangespace(ops))
216213
end
217-
@static if VERSION >= v"1.8"
218-
Base.@constprop :aggressive function InterlaceOperator(opsin::Tuple{Operator, Vararg{Operator}}, promotedomain = true)
219-
_InterlaceOperator(opsin, promotedomain)
220-
end
221-
else
222-
function InterlaceOperator(opsin::Tuple{Operator, Vararg{Operator}}, promotedomain = true)
223-
_InterlaceOperator(opsin, promotedomain)
224-
end
225-
end
226214

227215
InterlaceOperator(ops::AbstractArray, ds=NoSpace, rs=ds) =
228216
InterlaceOperator(Array{Operator{promote_eltypeof(ops)}, ndims(ops)}(ops), ds, rs)

src/Operators/general/algebra.jl

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -250,34 +250,18 @@ struct TimesOperator{T,BW,SZ,O<:Operator{T},BBW,SBBW} <: Operator{T}
250250
israggedbelow::Bool
251251
isafunctional::Bool
252252

253-
@static if VERSION >= v"1.8"
254-
Base.@constprop :aggressive function TimesOperator{T,BW,SZ,O,BBW,SBBW}(ops::Vector{O}, bw::BW,
255-
sz::SZ, bbw::BBW, sbbw::SBBW,
256-
ibbb::Bool, irb::Bool, isaf::Bool;
257-
anytimesop = any(x -> x isa TimesOperator, ops)) where {T,O<:Operator{T},BW,SZ,BBW,SBBW}
258-
259-
# check compatible
260-
check_times(ops)
261-
262-
# remove TimesOperators buried inside ops
263-
newops = anytimesop ? splice_times(ops) : ops
264-
265-
new{T,BW,SZ,O,BBW,SBBW}(newops, bw, sz, bbw, sbbw, ibbb, irb, isaf)
266-
end
267-
else
268-
function TimesOperator{T,BW,SZ,O,BBW,SBBW}(ops::Vector{O}, bw::BW,
269-
sz::SZ, bbw::BBW, sbbw::SBBW,
270-
ibbb::Bool, irb::Bool, isaf::Bool;
271-
anytimesop = any(x -> x isa TimesOperator, ops)) where {T,O<:Operator{T},BW,SZ,BBW,SBBW}
253+
Base.@constprop :aggressive function TimesOperator{T,BW,SZ,O,BBW,SBBW}(ops::Vector{O}, bw::BW,
254+
sz::SZ, bbw::BBW, sbbw::SBBW,
255+
ibbb::Bool, irb::Bool, isaf::Bool;
256+
anytimesop = any(x -> x isa TimesOperator, ops)) where {T,O<:Operator{T},BW,SZ,BBW,SBBW}
272257

273-
# check compatible
274-
check_times(ops)
258+
# check compatible
259+
check_times(ops)
275260

276-
# remove TimesOperators buried inside ops
277-
newops = anytimesop ? splice_times(ops) : ops
261+
# remove TimesOperators buried inside ops
262+
newops = anytimesop ? splice_times(ops) : ops
278263

279-
new{T,BW,SZ,O,BBW,SBBW}(newops, bw, sz, bbw, sbbw, ibbb, irb, isaf)
280-
end
264+
new{T,BW,SZ,O,BBW,SBBW}(newops, bw, sz, bbw, sbbw, ibbb, irb, isaf)
281265
end
282266
end
283267

@@ -334,13 +318,7 @@ function convert(::Type{Operator{T}}, P::TimesOperator) where {T}
334318
end
335319
end
336320

337-
338-
@static if VERSION > v"1.8"
339-
Base.@constprop :aggressive promotetimes(args...) = _promotetimes(args...)
340-
else
341-
promotetimes(args...) = _promotetimes(args...)
342-
end
343-
@inline function _promotetimes(opsin,
321+
Base.@constprop :aggressive function promotetimes(opsin,
344322
dsp=domainspace(last(opsin)),
345323
anytimesop=true)
346324

@@ -666,22 +644,14 @@ end
666644
-(A::Operator) = ConstantTimesOperator(-1, A)
667645
-(A::Operator, B::Operator) = A + (-B)
668646

669-
@inline function _mulop(f::Fun, A::Operator)
647+
Base.@constprop :aggressive function *(f::Fun, A::Operator)
670648
if isafunctional(A) && (isinf(bandwidth(A, 1)) || isinf(bandwidth(A, 2)))
671649
LowRankOperator(f, A)
672650
else
673651
TimesOperator(Multiplication(f, rangespace(A)), A)
674652
end
675653
end
676654

677-
@static if VERSION >= v"1.8"
678-
Base.@constprop :aggressive function *(f::Fun, A::Operator)
679-
_mulop(f, A)
680-
end
681-
else
682-
*(f::Fun, A::Operator) = _mulop(f, A)
683-
end
684-
685655
*(c::Number, A::Operator) = ConstantTimesOperator(c, A)
686656
*(A::Operator, c::Number) = c * A
687657

0 commit comments

Comments
 (0)