Skip to content

Commit 0f042d4

Browse files
committed
affine setdiff
1 parent 0ebe9de commit 0f042d4

File tree

5 files changed

+8
-29
lines changed

5 files changed

+8
-29
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Support for orthogonal polynomial-based spaces in ApproxFun
1010

1111

1212

13-
[ApproxFun.jl](https://github.com/JuliaApproximation/ApproxFun.jl) is a package for approximating functions. This package implements Fourier based spaces to ApproxFun.
13+
[ApproxFun.jl](https://github.com/JuliaApproximation/ApproxFun.jl) is a package for approximating functions. This package implements orthogonal polynomial based spaces to ApproxFun, including Chebyshev, Jacobi,

REQUIRE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ Reexport v0.2.0
33
ApproxFunBase
44
FastGaussQuadrature 0.3.2
55
FastTransforms 0.4.2
6-
RecipesBase 0.5
76
DualNumbers 0.4
87
ToeplitzMatrices 0.4
98
Calculus 0.1.15
109
DomainSets 0.0.1
1110
IntervalSets 0.3.1
1211
StaticArrays 0.8.3
1312
BlockArrays 0.8
14-
BlockBandedMatrices 0.3.5
13+
BlockBandedMatrices 0.4
1514
BandedMatrices 0.9
1615
AbstractFFTs 0.3.1
1716
FFTW 0.2.4

src/ApproxFunOrthogonalPolynomials.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import ApproxFunBase: normalize!, flipsign, FiniteRange, Fun, MatrixFun, UnsetSp
3434
Segment, IntervalOrSegmentDomain, PiecewiseSegment, isambiguous, Vec, eps, isperiodic,
3535
arclength, complexlength,
3636
invfromcanonicalD, fromcanonical, tocanonical, fromcanonicalD, tocanonicalD, canonicaldomain, setcanonicaldomain, mappoint,
37-
reverseorientation, checkpoints, evaluate, mul_coefficients, coefficients, isconvertible,
37+
reverseorientation, checkpoints, evaluate, extrapolate, mul_coefficients, coefficients, isconvertible,
3838
clenshaw, ClenshawPlan, sineshaw,
3939
toeplitz_getindex, toeplitz_axpy!, sym_toeplitz_axpy!, hankel_axpy!, ToeplitzOperator, SymToeplitzOperator, hankel_getindex,
4040
SpaceOperator, ZeroOperator, InterlaceOperator,
@@ -43,7 +43,7 @@ import ApproxFunBase: normalize!, flipsign, FiniteRange, Fun, MatrixFun, UnsetSp
4343
chebmult_getindex, intpow, alternatingsum,
4444
domaintype, diagindshift, rangetype, weight, isapproxinteger, default_Dirichlet, scal!, dotu,
4545
components, promoterangespace, promotedomainspace,
46-
block, blockstart, blockstop, blocklengths, isblockbanded, pointscompatible
46+
block, blockstart, blockstop, blocklengths, isblockbanded, pointscompatible, affine_setdiff, complexroots
4747

4848
import DomainSets: Domain, indomain, UnionDomain, ProductDomain, FullSpace, Point, elements, DifferenceDomain,
4949
Interval, ChebyshevInterval, boundary, ∂, rightendpoint, leftendpoint,

src/Domains/Domains.jl

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,6 @@ isless(d2::Ray{true,T2},d1::IntervalOrSegment{T1}) where {T1<:Real,T2<:Real} = d
1010

1111

1212
## set minus
13-
function Base.setdiff(d::Union{AbstractInterval,Segment,Ray,Line}, ptsin::UnionDomain{AS}) where {AS <: AbstractVector{P}} where {P <: Point}
14-
pts=Number.(elements(ptsin))
15-
isempty(pts) && return d
16-
tol=sqrt(eps(arclength(d)))
17-
da=leftendpoint(d)
18-
isapprox(da,pts[1];atol=tol) && popfirst!(pts)
19-
isempty(pts) && return d
20-
db=rightendpoint(d)
21-
isapprox(db,pts[end];atol=tol) && pop!(pts)
13+
Base.setdiff(d::Union{AbstractInterval,Segment,Ray,Line}, ptsin::UnionDomain{AS}) where {AS <: AbstractVector{P}} where {P <: Point} =
14+
affine_setdiff(d, ptsin)
2215

23-
sort!(pts)
24-
leftendpoint(d) > rightendpoint(d) && reverse!(pts)
25-
filter!(p->p d,pts)
26-
27-
isempty(pts) && return d
28-
length(pts) == 1 && return d \ pts[1]
29-
30-
ret = Array{Domain}(undef, length(pts)+1)
31-
ret[1] = Domain(leftendpoint(d) .. pts[1])
32-
for k = 2:length(pts)
33-
ret[k] = Domain(pts[k-1]..pts[k])
34-
end
35-
ret[end] = Domain(pts[end] .. rightendpoint(d))
36-
UnionDomain(ret)
37-
end

src/Spaces/Singularities/LogWeight.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export LogWeight
2+
13
"""
24
LogWeight(β,α,s::Space)
35

0 commit comments

Comments
 (0)