FunctionMaps.jl
What is FunctionMaps.jl
FunctionMaps is a submodule of DomainSets as of version 0.7.10. The module collects all functionality in the package that relates to functions in the sense of a map between spaces. It defines properties such as the jacobian etcetera.
The module is expected to be moved into a separate package in the future and will be independently documented.
Public API Reference
Constants
Functions
DomainSets.FunctionMaps.affinematrix — MethodReturn the matrix A in the affine map Ax+b.
DomainSets.FunctionMaps.affinevector — MethodReturn the vector b in the affine map Ax+b.
DomainSets.FunctionMaps.canonicalmap — Methodcanonicalmap([ctype::CanonicalType, ]map)Return an associated canonical map, if any, of the given map.
Optionally, a canonical type argument may specify an alternative canonical map. Canonical maps help with converting between equal maps of different types.
DomainSets.FunctionMaps.codomaintype — Methodcodomaintype(m[, T])What is the codomain type of the function map m, given that T is its domain type?
DomainSets.FunctionMaps.convert_numtype — Methodconvert_numtype(T, x)Convert x such that its numtype equals T.
DomainSets.FunctionMaps.convert_prectype — Methodconvert_prectype(T, x)Convert x such that its prectype equals T.
DomainSets.FunctionMaps.diffvolume — Methoddiffvolume(m[, x])Compute the differential volume (at a point x). If J is the Jacobian matrix, possibly rectangular, then the differential volume is sqrt(det(J'*J)).
If the map is square, then the differential volume is the absolute value of the Jacobian determinant.
DomainSets.FunctionMaps.domaintype — Methoddomaintype(m)What is the expected type of a point in the domain of the function map m?
DomainSets.FunctionMaps.inverse — Methodinverse(m[, x])Return the inverse of m. The two-argument function evaluates the inverse at the point x.
DomainSets.FunctionMaps.isequalmap — Methodisequalmap(map1, map2)Are the two given maps equal?
DomainSets.FunctionMaps.jacdet — Methodjacdet(m[, x])Return the determinant of the jacobian as a map. The two-argument version evaluates the jacobian determinant at a point x.
DomainSets.FunctionMaps.jacobian — Methodjacobian(m[, x])Return the jacobian map. The two-argument version evaluates the jacobian at a point x.
DomainSets.FunctionMaps.leftinverse — Methodleftinverse(m[, x])Return a left inverse of the given map. This left inverse mli is not unique, but in any case it is such that (mli ∘ m) * x = x for each x in the domain of m.
The two-argument function applies the left inverse to the point x.
DomainSets.FunctionMaps.numtype — MethodThe numeric element type of x in a Euclidean space.
DomainSets.FunctionMaps.prectype — Methodprectype(x[, ...])The floating point precision type associated with the argument(s).
DomainSets.FunctionMaps.rightinverse — Methodrightinverse(m[, x])Return a right inverse of the given map. This right inverse mri is not unique, but in any case it is such that (m ∘ mri) * y = y for each y in the range of m.
The two-argument function applies the right inverse to the point x.
Types
DomainSets.FunctionMaps.AffineMap — TypeThe supertype of all affine maps that store A and b. Concrete subtypes differ in how A and b are represented.
DomainSets.FunctionMaps.ConstantMap — TypeThe supertype of constant maps from T to U.
DomainSets.FunctionMaps.IdentityMap — TypeSupertype of identity maps.
DomainSets.FunctionMaps.LinearMap — TypeThe supertype of all linear maps y = A*x. Concrete subtypes may differ in how A is represented.
DomainSets.FunctionMaps.Map — TypeA Map{T} is a map of a single variable of type T.
DomainSets.FunctionMaps.MapRef — TypeMapRef(m)A reference to a map.
In a function call, MapRef(x) can be used to indicate that x should be treated as a map, e.g., foo(x, MapRef(m)).
DomainSets.FunctionMaps.StaticIdentityMap — TypeThe identity map for variables of type T.
DomainSets.FunctionMaps.Translation — TypeA Translation represents the map y = x + b.
DomainSets.FunctionMaps.UnityMap — TypeThe unity map f(x) = 1.
DomainSets.FunctionMaps.ZeroMap — TypeThe zero map f(x) = 0.
Internal API Reference
This is an exhaustive list of all non-exported constants, types and functions in FunctionMaps.jl.
Unexported functions and types are subject to change across different releases of the package, even if the release is said to be non-breaking.
Constants
DomainSets.FunctionMaps.AnyMap — TypeAnyMap is the union of Map and MapRef.
In both cases map(m::AnyMap) returns the map itself.
Functions
DomainSets.FunctionMaps.affine_composition — MethodCompute the affine map that represents map2 after map1, that is: y = a2*(a1*x+b1)+b2 = a2*a1*x + a2*b1 + b2.
DomainSets.FunctionMaps.bounded_interval_map — MethodLike interval_map, but guaranteed to return a scalar affine map.
DomainSets.FunctionMaps.canonicalextensiontype — MethodReturn the extension type associated with the given object.
DomainSets.FunctionMaps.checkmap — Methodcheckmap(m)
Checks that m is a map or refers to a map and if so returns that map, throws an error otherwise.
DomainSets.FunctionMaps.convert_eltype — Methodconvert_eltype(T, x)Convert x such that its eltype equals T.
DomainSets.FunctionMaps.convert_fromcartesian — MethodConvert a vector from a cartesian format to a nested tuple according to the given dimensions.
For example: convert_fromcartesian([1,2,3,4,5], Val{(2,2,1)}()) -> ([1,2],[3,4],5)
DomainSets.FunctionMaps.convert_tocartesian — MethodThe inverse function of convert_fromcartesian.
DomainSets.FunctionMaps.euclideandimension — MethodWhat is the euclidean dimension of the given type (if applicable)?
DomainSets.FunctionMaps.factor — MethodFactor I... of a product-like composite object.
DomainSets.FunctionMaps.factors — FunctionFactors of a product-like composite object (equivalent to components(d)).
DomainSets.FunctionMaps.functionmap — Methodfunctionmap(m)Return a map associated with the object m.
DomainSets.FunctionMaps.glm_domaintype — MethodWhat is the suggested domaintype for a generic linear map A*x with the given argument 'A'?
DomainSets.FunctionMaps.hascanonicalmap — MethodDoes the map have a canonical map?
DomainSets.FunctionMaps.hashrec — MethodApply the hash function recursively to the given arguments.
DomainSets.FunctionMaps.identitymatrix — MethodReturn an identity matrix with the same size as the map.
DomainSets.FunctionMaps.interval_map — MethodMap the interval [a,b] to the interval [c,d].
This function deals with infinite intervals, and the type of the map returned may depend on the value (finiteness) of the given endpoints.
DomainSets.FunctionMaps.issquaremap — MethodIs the given map a square map?
DomainSets.FunctionMaps.isvectorvalued — MethodIs the map a vector-valued function, i.e., a function from Rn to Rm?
DomainSets.FunctionMaps.nfactors — MethodThe number of factors of a product-like composite object.
DomainSets.FunctionMaps.promotable_eltypes — MethodAre the given element types promotable to a concrete supertype?
DomainSets.FunctionMaps.promotable_maps — MethodCan the maps be promoted to a common domain type without throwing an error?
DomainSets.FunctionMaps.promote_map_point_pair — MethodPromote map and point to compatible types.
DomainSets.FunctionMaps.promote_maps — MethodPromote the given maps to have a common domain type.
DomainSets.FunctionMaps.promote_numtype — Methodpromote_numtype(a, b[, ...])Promote the numeric types of the arguments to a joined supertype.
DomainSets.FunctionMaps.promote_prectype — Methodpromote_prectype(a, b[, ...])Promote the precision types of the arguments to a joined supertype.
DomainSets.FunctionMaps.simplifies — Methodsimplifies(m)Does the map simplify?
DomainSets.FunctionMaps.simplify — Methodsimplify(m)Simplify the given map to an equal map.
DomainSets.FunctionMaps.to_matrix — Methodto_matrix(::Type{T}, A[, b])Convert the A in the affine map A*x or A*x+b with domaintype T to a matrix.
DomainSets.FunctionMaps.to_numtype — Methodto_numtype(U, T)Return the type to which T can be converted, such that the numtype becomes U.
DomainSets.FunctionMaps.to_prectype — Methodto_prectype(U, T)Return the type to which T can be converted, such that the prectype becomes U.
DomainSets.FunctionMaps.to_vector — Methodto_vector(::Type{T}, A[, b])Convert the b in the affine map A*x or A*x+b with domaintype T to a vector.
DomainSets.FunctionMaps.tofunctionmap — MethodConvert the given map to a map defined in FunctionMaps.jl.
DomainSets.FunctionMaps.zeromatrix — MethodReturn a zero matrix of the same size as the map.
DomainSets.FunctionMaps.zerovector — MethodReturn a zero vector of the same size as the codomain of the map.
Types
DomainSets.FunctionMaps.AbsMap — TypeAn AbsMap returns the absolute value of the result of a given map.
DomainSets.FunctionMaps.AbstractAffineMap — TypeAn affine map has the general form y = A*x + b.
We use affinematrix(m) and affinevector(m) to denote A and b respectively. Concrete subtypes include linear maps of the form y = A*x and translations of the form y = x + b.
DomainSets.FunctionMaps.AbstractMap — TypeAn AbstractMap represents a function y=f(x) of a single variable.
DomainSets.FunctionMaps.AngleMap — TypeAngleMap is a left inverse of UnitCircleMap. A 2D vector x is projected onto the intersection point with the unit circle of the line connecting x to the origin. The angle of this point, scaled to the interval [0,1), is the result.
DomainSets.FunctionMaps.CanonicalExtensionType — TypeCanonicalExtensionType <: CanonicalTypeCanonical types used to translate between packages.
DomainSets.FunctionMaps.CanonicalType — TypeSupertype of different kinds of canonical objects.
DomainSets.FunctionMaps.CartToPolarMap — TypeA Cartesion to Polar map. First dimension is interpreted as radial distance, second as an angle. The unit circle is mapped to the square [-1,1]x[-1,1].
DomainSets.FunctionMaps.ComplexToVector — MethodComplexToVector()
ComplexToVector{T}()Map a complex number $a+bi$ to the length 2 vector $[a; b]$.
See also: VectorToComplex.
DomainSets.FunctionMaps.ComposedMap — TypeThe composition of several maps.
DomainSets.FunctionMaps.CompositeLazyMap — TypeA composite lazy map is defined in terms of several other maps.
DomainSets.FunctionMaps.DerivedMap — TypeA DerivedMap inherits all of its properties from another map, but has its own type.
DomainSets.FunctionMaps.DeterminantMap — TypeA DeterminantMap returns the determinant of the result of a given map.
DomainSets.FunctionMaps.DynamicIdentityMap — TypeIdentity map with dynamic size determined by a dimension field.
DomainSets.FunctionMaps.Equal — TypeEqual <: CanonicalTypeA canonical object that is equal but simpler.
DomainSets.FunctionMaps.Equivalent — TypeEquivalent <: CanonicalTypeA canonical object that is equivalent but may have different type.
DomainSets.FunctionMaps.FixedConstantMap — TypeThe constant map f(x) = c.
DomainSets.FunctionMaps.FlatToNested — TypeMap a flattened vector to a nested one.
DomainSets.FunctionMaps.GenericAffineMap — TypeAn affine map for any combination of types of A and b.
DomainSets.FunctionMaps.GenericLinearMap — TypeA GenericLinearMap is a linear map y = A*x for any type of A.
DomainSets.FunctionMaps.GenericTranslation — TypeTranslation by a generic vectorlike object.
DomainSets.FunctionMaps.IsMap — TypeIsMap()indicates an object implements the map interface.
DomainSets.FunctionMaps.Isomorphism — TypeIsomorphism{T,U} <: TypedMap{T,U}An isomorphism is a bijection between types that preserves norms.
DomainSets.FunctionMaps.LazyDiffVolume — TypeA lazy volume element evaluates to diffvolume(m, x) on the fly.
DomainSets.FunctionMaps.LazyInverse — TypeA lazy inverse stores a map m and returns inverse(m, x).
DomainSets.FunctionMaps.LazyJacobian — TypeA lazy Jacobian J stores a map m and returns J(x) = jacobian(m, x).
DomainSets.FunctionMaps.LazyMap — TypeA lazy map has an action that is defined in terms of other maps. Those maps are stored internally, and the action of the lazy map is computed on-the-fly and only when invoked.
DomainSets.FunctionMaps.MapStyle — TypeMapStyle(m)Trait to indicate whether or not m implements the map interface.
DomainSets.FunctionMaps.MulMap — TypeThe lazy multiplication of one or more maps.
DomainSets.FunctionMaps.NestedToFlat — TypeMap a nested vector or tuple to a flat vector.
DomainSets.FunctionMaps.NotMap — TypeNotMap()indicates an object does not implement the Map interface.
DomainSets.FunctionMaps.NumberToVector — MethodNumberToVector()
NumberToVector{T}()Map a number x to the length 1 vector [x].
See also: VectorToNumber.
DomainSets.FunctionMaps.PolarToCartMap — TypeA Polar to Cartesian map. The angle is mapped to the second dimension, radius to the first. The square [-1,1]x[-1,1] is mapped to the unit circle.
DomainSets.FunctionMaps.ProductMap — TypeA product map is diagonal and acts on each of the components of x separately: y = f(x) becomes y_i = f_i(x_i).
DomainSets.FunctionMaps.ScalarAffineMap — TypeAn affine map with scalar representation.
DomainSets.FunctionMaps.ScalarLinearMap — TypeA ScalarLinearMap is a linear map y = A*x for scalars.
DomainSets.FunctionMaps.ScalarTranslation — TypeTranslation by a scalar value.
DomainSets.FunctionMaps.SimpleLazyMap — TypeA simple lazy map derives from a single other map.
DomainSets.FunctionMaps.StaticAffineMap — TypeAn affine map with representation using static arrays.
DomainSets.FunctionMaps.StaticLinearMap — TypeA StaticLinearMap is a linear map y = A*x using static arrays.
DomainSets.FunctionMaps.StaticTranslation — TypeTranslation by a static vector.
DomainSets.FunctionMaps.SumMap — TypeThe lazy sum of one or more maps.
DomainSets.FunctionMaps.TupleProductMap — TypeA TupleProductMap is a product map with all components collected in a tuple. There is no vector-valued function associated with this map.
DomainSets.FunctionMaps.TupleToVector — TypeMap a tuple to a static vector.
DomainSets.FunctionMaps.TypedMap — TypeA TypedMap{T,U} maps a variable of type T to a variable of type U.
DomainSets.FunctionMaps.UnitCircleMap — TypeThe map [cos(2πt), sin(2πt)] from [0,1] to the unit circle in ℝ^2.
DomainSets.FunctionMaps.UnitDiskMap — TypeThe map r*[cos(2πt), sin(2πt)] from [0,1]^2 to the unit disk in ℝ^2.
DomainSets.FunctionMaps.VcatMap — TypeA VcatMap is a product map with domain and codomain vectors concatenated (vcat) into a single vector.
DomainSets.FunctionMaps.VectorAffineMap — TypeAn affine map with array and vector representation.
DomainSets.FunctionMaps.VectorLinearMap — TypeA VectorLinearMap is a linear map y = A*x using vectors and matrices.
DomainSets.FunctionMaps.VectorProductMap — TypeA VectorProductMap is a product map where all components are univariate maps, with inputs and outputs collected into a Vector.
DomainSets.FunctionMaps.VectorToComplex — MethodVectorToComplex()
VectorToComplex{T}()Map a length 2 vector $[a;b]$ to the complex number $a+bi$.
See also: ComplexToVector.
DomainSets.FunctionMaps.VectorToNumber — MethodVectorToNumber()
VectorToNumber{T}()Map a length 1 vector x to the number x[1].
See also: NumberToVector.
DomainSets.FunctionMaps.VectorToTuple — TypeMap a static vector to a tuple.
DomainSets.FunctionMaps.VectorTranslation — TypeTranslation by a vector.
DomainSets.FunctionMaps.WrappedMap — TypeA WrappedMap{T} takes any object and turns it into a Map{T}.