Skip to content

Commit 102cd9b

Browse files
committed
Move shared code here, export spaces
1 parent 09f7c6b commit 102cd9b

File tree

5 files changed

+30
-5
lines changed

5 files changed

+30
-5
lines changed

REQUIRE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
julia 0.7
22
FastGaussQuadrature 0.3.2
33
FastTransforms 0.4.2
4-
RecipesBase 0.5
54
DualNumbers 0.4
65
ToeplitzMatrices 0.4
76
Calculus 0.1.15

src/ApproxFunBase.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ export pad!, pad, chop!, sample,
9696
complexroots, roots, svfft, isvfft,
9797
reverseorientation, jumplocations
9898

99-
##Testing
100-
export bisectioninv
101-
10299
export .., Interval, ChebyshevInterval, leftendpoint, rightendpoint, endpoints, cache
103100

104101

src/Domains/Domains.jl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,29 @@ end
3939
# multivariate domainxs
4040

4141
include("multivariate.jl")
42+
43+
function affine_setdiff(d::Domain, ptsin::UnionDomain)
44+
pts=Number.(elements(ptsin))
45+
isempty(pts) && return d
46+
tol=sqrt(eps(arclength(d)))
47+
da=leftendpoint(d)
48+
isapprox(da,pts[1];atol=tol) && popfirst!(pts)
49+
isempty(pts) && return d
50+
db=rightendpoint(d)
51+
isapprox(db,pts[end];atol=tol) && pop!(pts)
52+
53+
sort!(pts)
54+
leftendpoint(d) > rightendpoint(d) && reverse!(pts)
55+
filter!(p->p d,pts)
56+
57+
isempty(pts) && return d
58+
length(pts) == 1 && return d \ pts[1]
59+
60+
ret = Array{Domain}(undef, length(pts)+1)
61+
ret[1] = Domain(leftendpoint(d) .. pts[1])
62+
for k = 2:length(pts)
63+
ret[k] = Domain(pts[k-1]..pts[k])
64+
end
65+
ret[end] = Domain(pts[end] .. rightendpoint(d))
66+
UnionDomain(ret)
67+
end

src/Spaces/DiracSpace.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
export DiracDelta, KroneckerDelta
1+
export DiracDelta, KroneckerDelta, DiracSpace, PointSpace
2+
23
for TYP in (:DiracSpace,:PointSpace)
34
@eval begin
45
struct $TYP{T,D,R} <: Space{D,R}

src/specialfunctions.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,8 @@ end
537537
extrema(f::Fun{PiecewiseSpace{SV,DD,RR},T}) where {SV,DD<:UnionDomain,RR<:Real,T<:Real} =
538538
mapreduce(extrema,(x,y)->extrema([x...;y...]),components(f))
539539

540+
function complexroots end
541+
540542
function roots(f::Fun{P}) where P<:PiecewiseSpace
541543
rts=mapreduce(roots,vcat,components(f))
542544
k=1

0 commit comments

Comments
 (0)