1
1
module ApproxFunBase
2
2
using Base: AnyDict
3
- using Base, BlockArrays, BandedMatrices, BlockBandedMatrices, DomainSets, IntervalSets,
4
- SpecialFunctions, AbstractFFTs, FFTW, SpecialFunctions, DSP, DualNumbers,
5
- LinearAlgebra, SparseArrays, LowRankApprox, FillArrays, InfiniteArrays, InfiniteLinearAlgebra # , Arpack
6
- import StaticArrays, Calculus
7
-
8
- import DomainSets: Domain, indomain, UnionDomain, ProductDomain, FullSpace, Point, elements, DifferenceDomain,
9
- Interval, ChebyshevInterval, boundary, ∂, rightendpoint, leftendpoint,
10
- dimension, WrappedDomain, VcatDomain, component, components, ncomponents
11
-
12
-
3
+ using Base, BlockArrays, BandedMatrices, BlockBandedMatrices, DomainSets,
4
+ IntervalSets, SpecialFunctions, AbstractFFTs, FFTW,
5
+ SpecialFunctions, DSP, DualNumbers, LinearAlgebra, SparseArrays,
6
+ LowRankApprox, FillArrays, InfiniteArrays, InfiniteLinearAlgebra
7
+ # Arpack
13
8
14
- import AbstractFFTs: Plan, fft, ifft
15
- import FFTW: plan_r2r!, fftwNumber, REDFT10, REDFT01, REDFT00, RODFT00, R2HC, HC2R,
16
- r2r!, r2r, plan_fft, plan_ifft, plan_ifft!, plan_fft!
17
-
18
-
19
- import Base: values, convert, getindex, setindex!, * , + , - , == , < , <= , > , | , ! , != , eltype, iterate,
20
- >= , / , ^ , \ , ∪ , transpose, size, tail, broadcast, broadcast!, copyto!, copy, to_index, (:),
21
- similar, map, vcat, hcat, hvcat, show, summary, stride, sum, cumsum, sign, imag, conj, inv,
22
- complex, reverse, exp, sqrt, abs, abs2, sign, issubset, values, in, first, last, rand, intersect, setdiff,
23
- isless, union, angle, join, isnan, isapprox, isempty, sort, merge, promote_rule,
24
- minimum, maximum, extrema, argmax, argmin, findmax, findmin, isfinite,
25
- zeros, zero, one, promote_rule, repeat, length, resize!, isinf,
26
- getproperty, findfirst, unsafe_getindex, fld, cld, div,
27
- @_inline_meta , eachindex, firstindex, lastindex, keys, isreal, OneTo,
28
- Array, Vector, Matrix, view, ones, @propagate_inbounds , print_array,
29
- split, iszero, permutedims, rad2deg, deg2rad
9
+ import StaticArrays, Calculus
30
10
31
- import Base. Broadcast: BroadcastStyle, Broadcasted, AbstractArrayStyle, broadcastable,
32
- DefaultArrayStyle, broadcasted
11
+ import DomainSets: Domain, indomain, UnionDomain, ProductDomain, Point, ∂,
12
+ elements, DifferenceDomain, Interval, ChebyshevInterval, boundary,
13
+ rightendpoint, leftendpoint, dimension, WrappedDomain, VcatDomain,
14
+ component, components, ncomponents
15
+
16
+ using AbstractFFTs: Plan
17
+
18
+ import Base: values, convert, getindex, setindex!, * , + , - , == , < , <= , > , | , ! ,
19
+ != , eltype, iterate, / , ^ , \ ,
20
+ transpose, size, tail, broadcast, broadcast!, copyto!, copy,
21
+ to_index, (:), similar, map, vcat, hcat, hvcat, show, summary,
22
+ stride, sum, cumsum, imag, conj, inv, complex, reverse, exp,
23
+ sqrt, abs, abs2, sign, issubset, in, first, last, rand, intersect,
24
+ setdiff, isless, union, angle, join, isnan, isapprox, isempty,
25
+ sort, merge, minimum, maximum, extrema, argmax,
26
+ argmin, findmax, findmin, isfinite,
27
+ zeros, zero, one, promote_rule, repeat, length, resize!, isinf,
28
+ getproperty, findfirst, unsafe_getindex, fld, div,
29
+ eachindex, firstindex, lastindex, isreal,
30
+ OneTo, Array, Vector, Matrix, view, ones, @propagate_inbounds ,
31
+ print_array, split, iszero, permutedims, rad2deg, deg2rad
32
+
33
+ import Base. Broadcast: BroadcastStyle, Broadcasted, AbstractArrayStyle,
34
+ broadcastable, DefaultArrayStyle, broadcasted
33
35
34
36
import Statistics: mean
35
37
36
- import LinearAlgebra: BlasInt, BlasFloat, norm, ldiv!, mul!, det, eigvals, cross,
37
- qr, qr!, rank, isdiag, istril, istriu, issymmetric, ishermitian ,
38
- Tridiagonal, diagm, diagm_container, factorize, nullspace ,
39
- Hermitian, Symmetric, adjoint, transpose, char_uplo
38
+ import LinearAlgebra: BlasInt, BlasFloat, norm, ldiv!, mul!, det, cross,
39
+ qr, qr!, rank, isdiag, istril, istriu, issymmetric,
40
+ Tridiagonal, diagm, diagm_container, factorize,
41
+ nullspace, Hermitian, Symmetric, adjoint, transpose, char_uplo
40
42
41
43
import SparseArrays: blockdiag
42
44
@@ -45,35 +47,38 @@ import SparseArrays: blockdiag
45
47
# we need to import all special functions to use Calculus.symbolic_derivatives_1arg
46
48
# we can't do importall Base as we replace some Base definitions
47
49
import SpecialFunctions: sinpi, cospi, airy, besselh,
48
- asinh, acosh,atanh, erfcx, dawson, erf, erfi,
49
- sin, cos, sinh, cosh, airyai, airybi, airyaiprime, airybiprime,
50
- hankelh1, hankelh2, besselj, besselj0, bessely, besseli, besselk,
51
- besselkx, hankelh1x, hankelh2x, exp2, exp10, log2, log10,
52
- tan, tanh, csc, asin, acsc, sec, acos, asec,
53
- cot, atan, acot, sinh, csch, asinh, acsch,
54
- sech, acosh, asech, tanh, coth, atanh, acoth,
55
- expm1, log1p, lfact, sinc, cosc, erfinv, erfcinv, beta, lbeta,
56
- eta, zeta, gamma, lgamma, polygamma, invdigamma, digamma, trigamma,
57
- abs, sign, log, expm1, tan, abs2, sqrt, angle, max, min, cbrt, log,
58
- atan, acos, asin, erfc, inv
59
-
60
- import StaticArrays: SVector
61
-
62
- import BandedMatrices: bandrange, bandshift,
63
- inbands_getindex, inbands_setindex!, bandwidth, AbstractBandedMatrix,
64
- colstart, colstop, colrange, rowstart, rowstop, rowrange,
65
- bandwidths, _BandedMatrix, BandedMatrix
50
+ sin, cos, cosh, exp2, exp10, log2, log10, csc, acsc, sec,
51
+ asec, cot, acot, sinh, csch, asinh, acsch,
52
+ sech, acosh, asech, tanh, coth, atanh, acoth,
53
+ log1p, lfact, sinc, cosc, beta, lbeta,
54
+ eta, zeta, polygamma, logabsgamma, loggamma,
55
+ abs, sign, log, expm1, tan, abs2, sqrt, angle,
56
+ max, min, cbrt, atan, acos, asin, inv,
57
+ besselj, bessely, besseli, besselk, besselkx,
58
+ hankelh1, hankelh2, hankelh1x, hankelh2x,
59
+ # functions from Calculus.symbolic_derivatives_1arg
60
+ erf, erfinv, erfc, erfcinv, erfi, gamma, lgamma,
61
+ digamma, invdigamma, trigamma,
62
+ airyai, airybi, airyaiprime, airybiprime,
63
+ besselj0, besselj1, bessely0, bessely1,
64
+ erfcx, dawson
65
+
66
+ import BandedMatrices: bandrange, inbands_setindex!, bandwidth,
67
+ colstart, colstop, colrange, rowstart, rowstop, rowrange,
68
+ bandwidths, _BandedMatrix, BandedMatrix
66
69
67
70
import BlockArrays: blocksize, block, blockaxes, blockindex
68
- import BlockBandedMatrices: blockbandwidth, blockbandwidths, blockcolstop, blockcolrange,
69
- blockcolstart, blockrowstop, blockrowstart, blockrowrange,
70
- subblockbandwidth, subblockbandwidths, _BlockBandedMatrix,
71
- _BandedBlockBandedMatrix, BandedBlockBandedMatrix, BlockBandedMatrix,
72
- isblockbanded, isbandedblockbanded, bb_numentries, BlockBandedSizes
71
+ import BlockBandedMatrices: blockbandwidth, blockbandwidths, blockcolstop,
72
+ blockcolrange, blockcolstart, blockrowstop, blockrowstart,
73
+ subblockbandwidth, subblockbandwidths, _BlockBandedMatrix,
74
+ _BandedBlockBandedMatrix, BandedBlockBandedMatrix,
75
+ BlockBandedMatrix, isblockbanded, isbandedblockbanded,
76
+ bb_numentries, BlockBandedSizes
73
77
74
78
import FillArrays: AbstractFill, getindex_value
75
79
import LazyArrays: cache, CachedVector, cacheddata
76
- import InfiniteArrays: PosInfinity, InfRanges, AbstractInfUnitRange, OneToInf, InfiniteCardinal
80
+ import InfiniteArrays: PosInfinity, InfRanges, AbstractInfUnitRange,
81
+ OneToInf, InfiniteCardinal
77
82
78
83
79
84
# convenience for 1-d block ranges
@@ -93,7 +98,8 @@ export pad!, pad, chop!, sample,
93
98
complexroots, roots,
94
99
reverseorientation
95
100
96
- export .. , Interval, ChebyshevInterval, leftendpoint, rightendpoint, endpoints, cache
101
+ export .. , Interval, ChebyshevInterval, leftendpoint, rightendpoint
102
+ export endpoints, cache
97
103
98
104
import Base: oneto
99
105
0 commit comments