FrameFun.FrameFunDomains.Characteristic
— TypeA domain that is described by its characteristic function.
FrameFun.FrameFunDomains.ComparisonDomain
— TypeA ComparisonDomain is a domain that is implicitly defined by two Fourier series. Example: if binop is (x,y) -> x > y, then the Fourier domain is the domain where the first given Fourier series is greater than the second.
FrameFun.FrameFunDomains.FourierDomain
— TypeA FourierDomain is a domain that is implicitly defined by a Fourier series. Example: if relop is x -> x-2 > 0, then the Fourier domain is the domain where the given Fourier series is greater than 2.
FrameFun.DiffEquations.BoundaryCondition
— TypeA DiffEquation describes a differential equation, with or without boundary conditions. Parameters:
- Fun is the Expansion that will describe the result
When the equation is solved the equations: -Diff(Fun) = DRhs on the domain -diff(Fun) = dRhs on boundary will hold.
FrameFun.DiffEquations.FECollocationOperator
— TypeSpectral collocation Operators A spectral collocation operator is a DictionaryOperator from a Fourier Extension Frame to a GridBasis. It represents the linear differential operator: Lu = aX1samplerpD1 + ⋯ + aXrsamplerpDr where X is a grid multiplication operator for x -> x, and D is the derivative operator
FrameFun.AZDual
— TypeTrait type to select a dual dictionary suitable for the AZ algorithm.
FrameFun.AZSmoothStyle
— Typestruct AZSmoothStyle <: SolverStyle end
Use the AZ algorithm to solve the discretized approximation problem, but tweak the coefficients such that a smooth extension is obtained.
FrameFun.AZSolver
— TypeFast implementation of the AZ Algorithm. Returns an operator that is approximately pinv(A)
, based on a suitable Zt
so that (A*Zt-I)*A
is low rank.
Steps when applying to right hand side b:
- (I-AZt)Ax2=(I-AZt)*b, solve for x2
This is by default done using a low rank decomposition of (I-AZt)A (RandomizedSvdSolver).
- x1 = Zt(b-Ax2)
Can be done fast if Zt and A are fast.
- x = x1+x2
This is the solution.
FrameFun.AZStyle
— Typestruct AZStyle <: SolverStyle end
Use the AZ algorithm to solve the discretized approximation problem.
FrameFun.AbstractFun
— TypeSupertype of expansions in frames and bases.
FrameFun.AdaptiveApproximation
— Typestruct AdaptiveApproximation <: ApproximationProblem
An AdaptiveApproximation
only stores a platform, with which to compute adaptive approximations. It has no single platform parameter.
FrameFun.ApproximationProblem
— Typeabstract type ApproximationProblem end
Approximation problem types group the arguments that a user supplies to the Fun
constructor. This may be a dictionary or a platform, for example. By passing around approximation problem objects, functions can easily implement the same interface as Fun
.
All functionality is eventually delegated back to the underlying dictionary or platform. Thus, an approximation problem is nothing but an empty intermediate layer that passes on the questions to the right object regardless of how the question was asked.
Some of the properties of an approximation problem may be cached in order to improve efficiency.
FrameFun.AugmentationPlatform
— Typestruct AugmentationPlatform <: FramePlatform
An augmentation frame is the union of a basis, augmented with K
extra functions.
This type of frame is used as an example in the paper "Frames and numerical approximation II: generalized sampling" by B. Adcock and D. Huybrechs.
FrameFun.BasisPlatform
— Typeabstract type BasisPlatform <: Platform end
A BasisPlatform
represents a family of bases.
FrameFun.BasisStyle
— Typestruct BasisStyle <: DictionaryStyle end
The platform creates dictionaries that are bases.
FrameFun.CartesianParameterPath
— Typestruct CartesianParameterPath{TNTuple{N,Int}} <: ParameterPath{NTuple{N,Int}}
FrameFun.ChebyshevPlatform
— Typestruct ChebyshevPlatform{T} <: BasisPlatform
A platform of ChebyshevT dictionaries on [-1,1]
FrameFun.DictionaryStyle
— Typeabstract type DictionaryStyle end
A dictionary style trait for platforms
See also, BasisStyle
, FrameStyle
, UnknownDictionaryStyle
FrameFun.DirectStyle
— Typestruct DirectStyle <: SolverStyle end
Use a direct solver to solve the discretized approximation problem.
FrameFun.DiscreteGramStyle
— Typestruct DiscreteGramStyle <: ProjectionStyle end
Use the inner product implied by the measure obtained by invoking discretemeasure
on the dictionary or platform. This results in a discrete Gram matrix.
FrameFun.DiscreteStyle
— Typeabstract type DiscreteStyle <: SamplingStyle end
The sampling operator corresponds to evaluation in a grid. This grid is specified by the listed styles here:
FrameFun.DiscreteSubWeight
— Typestruct DiscreteSubWeight{T,M<:DiscreteWeight{T},G<:AbstractGrid} <: DiscreteWeight{T}
Submeasure of a discrete measure.
FrameFun.DiscreteTensorSubWeight
— Typeconst DiscreteTensorSubWeight{T,G,W} = DiscreteSubWeight{T,M,G} where {T,M<:DiscreteProductWeight,G<:ProductSubGrid}
A tensor product of discrete submeasures.
FrameFun.DualStyle
— Typestruct DualStyle <: SolverStyle end
Use projection on the dual dictionary to solve the discretized approximation problem.
FrameFun.ExactSvdSolver
— TypeA Truncated SVD solver storing a decomposition of an operator A. The cost is equal to the computation of the SVD of A.
For tensor product operators it returns a decomposition of the linearized system
FrameFun.ExtensionFrame
— Typestruct ExtensionFrame{S,T} <: DerivedDict{S,T}
An ExtensionFrame is the restriction of a basis to a subset of its domain. This results in a frame that implicitly represents extensions of functions on the smaller set to the larger set.
Created by the function extensionframe
.
See also extensionframe
julia> extensionframe(Fourier(10),0.0..0.5)
FrameFun.ExtensionFramePlatform
— Typestruct ExtensionFramePlatform <: FramePlatform
A platform that creates extension frames.
FrameFun.FE_TridiagonalSolver
— TypeA fast FE solver based on a low-rank approximation of the plunge region. The plunge region is isolated using a projection operator. For more details, see the paper 'Fast algorithms for the computation of Fourier extensions of arbitrary length' http://arxiv.org/abs/1509.00206
FrameFun.FourierExtensionPlatform
— Typestruct FourierExtensionPlatform <: FramePlatform
A platform of fourier extensions with [0,1] as bouding box.
FrameFun.FourierPlatform
— Typestruct FourierPlatform{T} <: BasisPlatform
A platform of Fourier series on [0,1]
FrameFun.FramePlatform
— Typeabstract type FramePlatform <: Platform end
A FramePlatform
represents a family of frames (or ill-conditioned bases which are in the limit a frame).
FrameFun.FrameStyle
— Typestruct FrameStyle <: DictionaryStyle end
The platform creates dictionaries that are frames.
FrameFun.GenericSamplingStyle
— Typestruct GenericSamplingStyle <: SamplingStyle end
Write your own sampling_operator. The sampling operator corresponds the one implemented by the user.
FrameFun.GramStyle
— Typestruct GramStyle <: ProjectionStyle end
Use the inner product implied by the measure obtained by invoking measure
on the dictionary or platform. This results in a Gram matrix.
FrameFun.GridStyle
— TypeThe sampling grid is determined by invoking platform_grid
on the platform, or by providing a grid=...
argument to the Fun constructor.
FrameFun.HierarchyPath
— TypeFrameFun.IncrementalCartesianParameterPath
— Typestruct IncrementalCartesianParameterPath{TNTuple{N,Int}} <: ParameterPath{NTuple{N,Int}}
FrameFun.InterpolationStyle
— TypeThe sampling grid is determined by invoking interpolation_grid
on the dictionary or platform.
FrameFun.InverseStyle
— Typestruct InverseStyle <: SolverStyle end
Use the inverse operator to solve the discretized approximation problem.
FrameFun.IterativeStyle
— Typestruct IterativeStyle <: SolverStyle end
Use an iterative method to solve the discretized approximation problem.
FrameFun.LinearParameterPath1D
— Typestruct LinearParameterPath1D{T<:Real} <: ParameterPath{Int}
FrameFun.ModelPlatform
— Typestruct ModelPlatform <: Platform
A ModelPlatform
is a platform based on a model dictionary. The platform is defined by resizing the dictionary, using its own implementation of resize
. All other operations are the defaults for the model dictionary.
This platform is convenient to compute adaptive approximations based on an example of a dictionary from the desired family.
FrameFun.NormalizedSampling
— TypeDiscrete sampling followed by normalizing the samples.
FrameFun.OPSExtensionFramePlatform
— Typestruct OPSExtensionFramePlatform <: FramePlatform
A platform of classical orthogonal polynomial extensions. The bouding box is [-1,1]
FrameFun.OversamplingStyle
— TypeThe sampling grid is determined by invoking oversampling_grid
on the dictionary or platform.
FrameFun.ParameterPath
— Typeabstract type ParameterPath{OUT} end
An indexable type that returns something of type OUT
. The index can have a lot of complexity, e.g.: A dictionary expansion and a function together determine a platform parameter that leads to a expansion with a smaller error, but more degrees of freedom.
FrameFun.Platform
— Typeabstract type Platform end
A platform represents a family of dictionaries.
A platform typically has a primal and a dual sequence. The platform maps an index to a set of parameter values, which is then used to generate a primal or dual dictionary (depending on the chosen measure).
See also BasisPlatform
, FramePlatform
](@ref)
FrameFun.PlatformApproximation
— TypeA PlatformApproximation
stores a platform and a platform parameter.
FrameFun.ProductPath
— TypeFrameFun.ProductPlatform
— Typestruct ProductPlatform{N} <: Platform
A ProductPlatform
corresponds to the product of two or more platforms. It results in a product dictionary, product sampling operator, product solver, ... etcetera.
FrameFun.ProductSamplingStyle
— Typestruct ProductSamplingStyle{STYLES} <: SamplingStyle
The sampling operator has product structure.
FrameFun.ProductSolverStyle
— Typestruct ProductSolverStyle <: SolverStyle
Use a tensor product solver to solve the discretized approximation problem.
FrameFun.ProjectionStyle
— Typeabstract type ProjectionStyle <: SamplingStyle end
The sampling operator corresponds to projections (using inner products). The kind of inner product is specified by GramStyle
, DiscreteGramStyle
, RectangularGramStyle
FrameFun.RandomizedSvdSolver
— TypeA Randomized Truncated SVD solver storing a decomposition of an operator A. If A is MxN, and of rank R, the cost of constructing this solver is MR^2.
For tensor product operators it returns a decomposition of the linearized system
FrameFun.RectangularGramStyle
— Typestruct RectangularGramStyle <: ProjectionStyle end
Not implemented (oversample with a projection on a larger dual dictionary)
FrameFun.SamplingStyle
— Typeabstract type SamplingStyle end
A sampling style trait for platforms
See also DiscreteStyle
, ProjectionStyle
, GenericSamplingStyle
, ProductSamplingStyle
FrameFun.SimpleFun
— TypeThe combination of an expansion with a platform.
FrameFun.SolverStyle
— Typeabstract type SolverStyle end
A solver style trait for platforms
See also DirectStyle
, InverseStyle
, DualStyle
, IterativeStyle
, TridiagonalProlateStyle
, AZStyle
, AZSmoothStyle
, ProductSolverStyle
FrameFun.SubWeight
— Typestruct SubWeight{M,D,T} <: Weight{T}
Submeasure of a Weight.
FrameFun.SumPlatform
— Typestruct SumPlatform <: FramePlatform
An sum platform is the union of two platforms.
FrameFun.TridiagonalProlateStyle
— Typestruct TridiagonalProlateStyle <: SolverStyle end
Use a tridiagonal solver to solve the discretized approximation problem (only for Fourier extension)
FrameFun.UnknownDictionaryStyle
— Typestruct UnknownDictionaryStyle <: DictionaryStyle end
The platform creates dictionaries of unknown format.
FrameFun.UnweightedDiscreteStyle
— TypeDiscrete sampling without associated weights.
FrameFun.WeightedDiscreteStyle
— TypeDiscrete sampling with associated weights.
FrameFun.WeightedSampling
— TypeDiscrete sampling followed by weighting the samples.
FrameFun.WeightedSumPlatform
— TypeA WeightedSumPlatform is the union of a finite number of copies of a single frame, each weighted by a function.
BasisFunctions.restrict
— Methodrestrict(measure::Weight, domain::Domain)
Restrict a measure to a subset of its support
FrameFun.:⇐
— MethodMake an extension frame (symbol ⇐ is \Leftarrow)
FrameFun.Fun
— MethodFun
is used to approximate functions in the same way as approximate
with the same interface. It discards all outputs of approximate
and only returns the function approximation.
FrameFun.ap_generic_options
— MethodA generic routine to process a few arguments given to the Fun interface.
FrameFun.approximationproblem
— Methodapproximationproblem(args...)
examples
Create an approximationproblem from a dictionary
julia> approximationproblem(Fourier(10))
Create an approximationproblem from a dictionary and a domain (extensionframe)
julia> approximationproblem(Fourier(10),0.0..0.5)
Create an approximationproblem from a platform
julia> approximationproblem(FourierPlatform())
Create an approximationproblem from a platform and a platform parameter
julia> approximationproblem(FourierPlatform(), 10)
FrameFun.azdual
— MethodThe dual that is used to create an AZ Z
matrix.
FrameFun.basis
— Methodbasis(f::ExtensionFrame)
Return the dictionary on the bouding box.
FrameFun.compute_fun
— MethodFor a given fun f(x)
compute the fun g(f(x))
.
FrameFun.dualdictionary
— Methoddualdictionary(platform::Platform, param, measure::Measure; options...)
Return the dual dictionary of the platform.
FrameFun.extensiondual
— Methodextensiondual(dict::ExtensionFrame, measure::Measure; options...)
Return the extension frame of the dual of the dictionary on the boundingbox.
FrameFun.extensionframe
— Methodextensionframe(basis::Dictionary, domain::Domain)
extensionframe(domain::Domain, basis::Dictionary)
Make an ExtensionFrame, but match tensor product domains with tensor product sets in a suitable way.
examples
For example: an interval ⊗ a disk (= a cylinder) combined with a 3D Fourier series, leads to a tensor product of a Fourier series on the interval ⊗ a 2D Fourier series on the disk.
julia> extensionframe(Fourier(10)^2,Disk(.4, SVector(0.5,0.5)))
Dictionary 𝔼(F ⊗ F)
𝔼 : Extension frame, from A mapped domain based on the 2-dimensional unit ball to 0.0..1.0 (Unit) x 0.0..1.0 (Unit)
F : Fourier series
↳ length = 10
↳ Float64 -> Complex{Float64}
↳ support = 0.0..1.0 (Unit)
julia> extensionframe(Fourier(10)^2,(0.0..0.5)^2)
Dictionary 𝔼(F) ⊗ 𝔼(F)
𝔼 : Extension frame, from 0.0..0.5 to 0.0..1.0 (Unit)
F : Fourier series
↳ length = 10
↳ Float64 -> Complex{Float64}
↳ support = 0.0..1.0 (Unit)
FrameFun.hasparam_inbetween
— Methodhasparam_inbetween(platform::Platform, param1, param2, stoptolerance)
FrameFun.index_set_hyperbolic_cross
— FunctionReturn a list of all indices in an n-dimensional hyperbolic cross.
FrameFun.index_set_total_degree
— MethodReturn a list of all indices of total degree at most s, in n dimensions.
FrameFun.monotonic_bisect
— MethodFind the root of a monotonically increasing function with a given starting value L_init
and using bisection.
The value is increased or decreased first (using bisect_larger
and bisect_smaller
) until an interval is found for which the objective function switches sign. Next, the smallest value of L
for which the objective function becomes positive is located using bisection (with bisect_average
to average out two values of L
).
The user can optionally supply an argument bt
, which will be passed as the first argument to the bisect_X
routines. Thus, the variable L
can have any type as long as making it larger/smaller or computing averages can be meaningfully defined.
The bisection is run until convergence. This ensures that if L
has a discrete nature, the optimal solution is always found exactly, in finite time.
FrameFun.param_double
— Methodparam_double(platform::Platform, param)
FrameFun.param_first
— Methodparam_first(platform::Platform)
FrameFun.param_inbetween
— Methodparam_inbetween(platform::Platform, param1, param2)
FrameFun.param_increment
— Methodparam_increment(platform::Platform, param)
FrameFun.platform
— Methodplatform(dict::Dictionary)
Return a platform that generates dictionaries of the type of dict.
FrameFun.platformparameter
— Methodplatformparameter(dict::Dictionary) = dimensions(dict)
Return the parameter that is given to a model-based platform to obtain this dictionary.
FrameFun.platformparameter
— MethodReturn the platform parameter of the approximation problem.
FrameFun.productparameter
— Methodproductparameter(p::ProductPlatform{N}, param)
Transform the parameter to a parameter accepted by a ProductPlatform
FrameFun.sampling_grid
— MethodReturn the sampling grid that would be used for an approximation problem.
FrameFun.submeasure
— Methodsubmeasure(measure::Weight, domain::Domain)
Restrict a measure to a subset of its support
FrameFun.@ap_interface
— Macro@ap_interface `function`
Generate an interface for the given function in terms of an approximation problem. The approximation problem is constructed from the arguments of the function.
FrameFun.@ap_property
— MacroCompute a property and store it in the ap cache.
FrameFun.@ap_sampling_property_to_platform
— MacroReturn the cached property of an approximation problem, where property
is a function.
If the result is not cached yet, compute it by invoking: property(ap; options...) = property(SamplingStyle(ap), platform(ap), platformparameter(ap), samplingparameter(ap); options...)
Then cache the result.