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