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



canonicalmap([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.

diffvolume(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.

jacdet(m[, x])

Return the determinant of the jacobian as a map. The two-argument version evaluates the jacobian determinant at a point x.

leftinverse(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.

rightinverse(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.



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)).

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.




Convert 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)


Map 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.



An 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.


AngleMap 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.


A 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].


A 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.


A 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.