Public API Reference
This is an exhaustive list of all exported modules, constants, types, functions and macros in DomainSets.jl.
Constants
DomainSets.AnyDomain — Type
AnyDomain is the union of Domain and DomainRef.
In both cases domain(d::AnyDomain) returns the domain itself.
DomainSets.ℂ — Constant
The set of complex numbers.
DomainSets.ℕ — Constant
The set of natural numbers.
DomainSets.ℚ — Constant
The set of rational numbers.
DomainSets.ℝ — Constant
The set of real numbers.
DomainSets.ℝ1 — Constant
The Euclidean space $ℝ^1$.
DomainSets.ℝ2 — Constant
The Euclidean space $ℝ^2$.
DomainSets.ℝ3 — Constant
The Euclidean space $ℝ^3$.
DomainSets.ℝ4 — Constant
The Euclidean space $ℝ^4$.
DomainSets.ℤ — Constant
The set of integers.
Functions
DomainSets.approx_in — Method
approx_in(x, domain::Domain [, tolerance])
Verify whether a point lies in the given domain with a certain tolerance.
The tolerance has to be positive. The meaning of the tolerance, in relation to the possible distance of the point to the domain, is domain-dependent. Usually, if the outcome is true, it means that the distance of the point to the domain is smaller than a constant times the tolerance. That constant may depend on the domain.
Up to inexact computations due to floating point numbers, it should also be the case that approx_in(x, d, 0) == in(x,d). This implies that approx_in reflects whether a domain is open or closed.
DomainSets.boundary — Function
Return the boundary of the given domain as a domain.
DomainSets.boundingbox — Method
Return a bounding box of the given domain.
A bounding box is an interval, a hyperrectangle or the full space. It is such that each point in the domain also lies in the bounding box.
DomainSets.canonicaldomain — Method
canonicaldomain([ctype::CanonicalType, ]d)Return an associated canonical domain, if any, of the given domain.
For example, the canonical domain of an Interval [a,b] is the interval [-1,1].
Optionally, a canonical type argument may specify an alternative canonical domain. Canonical domains help with establishing equality between domains, with finding maps between domains and with finding parameterizations.
If a domain implements a canonical domain, it should also implement mapfrom_canonical and mapto_canonical.
See also: mapfrom_canonical, mapto_canonical.
DomainSets.cartesianproduct — Method
cartesianproduct(domains...)Return the cartesian product of the given domains.
The function may simplify the result in some cases. Use the ProductDomain constructor to obtain an explicit representation as a product.
Examples
```julia julia> using DomainSets: ×
julia> (0..1) × (2..3) (0 .. 1) × (2 .. 3) ````
DomainSets.checkdomain — Method
checkdomain(d)
Checks that d is a domain or refers to a domain and if so returns that domain, throws an error otherwise.
DomainSets.choice — Method
Return a point from the given domain.
DomainSets.corners — Method
Return all corners of the domain in a vector.
DomainSets.cylinder — Method
Create a cylinder with given radius and length.
DomainSets.dimension — Method
What is the Euclidean dimension of the domain?
DomainSets.distance_to — Function
distance_to(d, x)Return the distance from the point x to the domain d.
DomainSets.domain — Method
domain(d)Return a domain associated with the object d.
DomainSets.domaineltype — Method
domaineltype(d)The domaineltype of a continuous set is a valid type for elements of that set. By default it is equal to the eltype of d, which in turn defaults to Any.
DomainSets.ellipse — Method
Create an ellipse curve with semi-axes lengths a and b respectively.
DomainSets.ellipse_shape — Method
Create an ellipse-shaped domain with semi-axes lengths a and b respectively.
DomainSets.emptyspace — Method
Return the empty space with the same element type as the given domain.
DomainSets.equaldomain — Method
equaldomain(domain)Return a canonical domain that is equal, but simpler. For example, a 1-dimensional ball is an interval. This function is equivalent to canonicaldomain(Equal(), d).
A domain and its equaldomain are always equal domains according to isequaldomain.
See also: canonicaldomain.
DomainSets.fullspace — Method
Return the full space with the same element type as the given domain.
DomainSets.hascanonicaldomain — Method
hascanonicaldomain([ctype::CanonicalType, ]d)Does the domain have a canonical domain?
See also: canonicaldomain.
DomainSets.hasequaldomain — Method
hasequaldomain(d)Does the domain have a known equal domain?
DomainSets.hasparameterization — Method
hasparameterization(d)Does the domain have a parameterization?
DomainSets.intersectdomain — Method
intersectdomain(domains...)Return a domain which agrees with the mathematical intersection of the given domains.
See also: IntersectDomain.
DomainSets.isequaldomain — Method
isequaldomain(d1, d2)Are the two given domains equal?
Domains are considered equal if their membership functions return the same output for the same input.
It is not always possible to verify this automatically. If the result is true, then the domains are guaranteed to be equal. If the result is false, then either the domains are not equal or they are equal but the implementation fails to recognize this.
DomainSets.map_domain — Method
map_domain(map, domain)Map a domain with the inverse of the given map.
DomainSets.mapfrom_canonical — Method
mapfrom_canonical(d[, x])Return a map to a domain d from its canonical domain.
If a second argument x is given, the map is evaluated at that point. The point x should be a point in the canonical domain of d, and the result is a point in d.
See also: mapto_canonical, canonicaldomain.
DomainSets.mapfrom_parameterdomain — Method
mapfrom_parameterdomain(d[, x])Convenience alias for mapfrom_canonical(Paramaterization(), d[, x]).
DomainSets.mapped_domain — Method
mapped_domain(invmap, domain)Make a mapped domain with the given inverse map.
DomainSets.mapto — Method
mapto(d1, d2)Return a map from domain d1 to domain d2.
DomainSets.mapto_canonical — Method
mapto_canonical(d[, x])Return a map from a domain d to its canonical domain.
If a second argument x is given, the map is evaluated at that point. The point x should be a point in the domain d, and the result is a point in the canonical domain.
See also: mapfrom_canonical, canonicaldomain.
DomainSets.mapto_parameterdomain — Method
mapto_parameterdomain(d[, x])Convenience alias for mapto_canonical(Paramaterization(), d[, x]).
See also: mapfrom_parameterdomain.
DomainSets.normal — Function
Return the normal of the domain at the point x.
It is assumed that x is a point on the boundary of the domain.
DomainSets.parameterdomain — Method
parameterdomain(d)A domain from which d can be parameterized.
DomainSets.parameterization — Method
parameterization(d)A map from the parameter domain of d to d.
DomainSets.setdiffdomain — Method
setdiffdomain(d1, d2)Return a domain which agrees with the mathematical difference of the given domains.
See also: SetdiffDomain.
DomainSets.tangents — Function
Return the tangents of the domain at the point x. The tangents form a basis for the tangent plane, perpendicular to the normal direction at x.
DomainSets.typedomain — Method
Return the domain for the element type of the given domain.
DomainSets.uniondomain — Method
uniondomain(domains...)Return a domain that agrees with the mathematical union of the arguments.
See also: UnionDomain.
DomainSets.volume — Function
Return the volume of the domain.
Types
DomainSets.Ball — Type
Ball{T,C} <: Domain{T}Abstract supertype for volumes of elements satisfying norm(x-center(ball)) < radius(ball) (open ball) or norm(x-center(ball)) <= radius(ball) (closed ball).
DomainSets.Ball — Method
Ball(radius = 1[, center])
Ball{T,C=:closed}(radius = 1[, center])Return a concrete subtype of Ball which represents a ball with the given radius and center, the given eltype T, and which is open or closed.
The default center is the origin. In case both radius and center are omitted, a subtype of UnitBall is returned, whose concrete type depends on T.
A ball represents a volume. For the boundary of a ball, see Sphere().
DomainSets.ChebyshevInterval — Type
ChebyshevInterval()
ChebyshevInterval{T=Float64}()The closed interval [-1,1].
DomainSets.ComplexNumbers — Type
The set of all complex numbers whose real and imaginary parts are real numbers.
DomainSets.ComplexUnitCircle — Type
ComplexUnitCircle()
ComplexUnitCircle{T}()The unit circle in the complex plane.
See also: ComplexUnitDisk.
DomainSets.ComplexUnitDisk — Type
ComplexUnitDisk()
ComplexUnitDisk{T}()
ComplexUnitDisk{T,C}()The unit disk in the complex plane. The disk is open when C=:open and closed when C=:closed.
See also: ComplexUnitCircle.
DomainSets.DomainRef — Type
DomainRef(d)A reference to a domain.
In a function call, DomainRef(x) can be used to indicate that x should be treated as a domain, e.g., foo(x, DomainRef(d)).
DomainSets.DomainStyle — Type
DomainStyle(d)Trait to indicate whether or not d implements the domain interface.
DomainSets.DynamicUnitBall — Type
DynamicUnitBall(dim::Int)
DynamicUnitBall{T}(dim::Int)
DynamicUnitBall{T,C=:closed}(dim::Int)The open or closed unit ball with variable dimension. Typically the element type is a Vector{T} and dim specifies the length of the vectors.
DomainSets.DynamicUnitCube — Type
A unit cube whose dimension is specified by a field.
DomainSets.DynamicUnitSimplex — Type
A unit simplex with vector elements with variable dimension determined by a field.
DomainSets.DynamicUnitSphere — Type
The unit sphere with variable dimension.
DomainSets.EmptySpace — Type
The empty space.
DomainSets.EuclideanDomain — Type
A EuclideanDomain is any domain whose eltype is <:StaticVector{N,T}.
DomainSets.EuclideanUnitBall — Type
The unit ball in a fixed N-dimensional space.
DomainSets.EuclideanUnitCube — Type
The unit cube in a fixed N-dimensional space.
DomainSets.EuclideanUnitSphere — Type
The unit sphere in a fixed N-dimensional Euclidean space.
DomainSets.FullSpace — Type
A domain that represents the full space.
The element type T in FullSpace{T} should only be seen as an indication of the expected types of the elements in the context where the domain is intended to be used. Due to the default, loose interpretation of T, any FullSpace{T} actually contains any x regardless of the type of x. For a strict domain of all elements of type T, or elements convertible exactly to T, use TypeDomain{T}.
DomainSets.HalfLine — Type
HalfLine()
HalfLine{T=Float64,C=:closed}()The positive halfline [0,∞) when C is :closed or (0,∞) when C is :open. The interval is always open at infinity.
See also: NonnegativeRealLine, PositiveRealLine.
DomainSets.IndicatorFunction — Type
An IndicatorFunction is a domain that implements f(x) = x ∈ D by storing f.
DomainSets.Integers — Type
The set of all integers.
DomainSets.IntersectDomain — Type
IntersectDomain(domains...)
IntersectDomain{T}(domains...)The lazy intersection of an iterable list of domains.
See also: intersectdomain.
DomainSets.IsDomain — Type
IsDomain()indicates an object implements the domain interface.
DomainSets.LevelSet — Type
The domain defined by f(x)=C for a given function f and constant C.
DomainSets.MappedDomain — Type
A MappedDomain stores the inverse map of a mapped domain.
DomainSets.NegativeHalfLine — Type
NegativeHalfLine()
NegativeHalfLine{T=Float64,C=:closed}()The negative halfline (-∞,0] when C is :closed or (-∞,0) when C is :open. The interval is always open at minus infinity.
See also: NonpositiveRealLine, NegativeRealLine.
DomainSets.NotDomain — Type
NotDomain()indicates an object does not implement the domain interface.
DomainSets.Point — Type
Point(x)represents a single point at x.
DomainSets.ProductDomain — Type
abstract type ProductDomain{T}Represents the cartesian product of other domains.
DomainSets.ProductDomain — Method
ProductDomain(domains...)
ProductDomain{T}(domains...)Return a concrete subtype of ProductDomain which agrees mathematically with the cartesian product of the given domains.
The concrete subtype being returned depends on T. If T is provided, it will be the eltype of the product domain. If T is not provided, a suitable choice is deduced from the arguments.
See also: VcatDomain, VectorProductDomain, TupleProductDomain, Rectangle(a,b).
DomainSets.Rationals — Type
The set of all rationals.
DomainSets.RealLine — Type
The real line (-∞,∞).
DomainSets.RealNumbers — Type
The set of all real numbers.
DomainSets.Rectangle — Type
Rectangle(a, b)
Rectangle(domains::ClosedInterval...)
Rectangle{T}(domains::ClosedInterval...)A rectangular domain in n dimensions with extrema determined by the vectors or points a and b or by the endpoints of the given intervals.
DomainSets.SetdiffDomain — Type
SetdiffDomain(d1, d2)
SetdiffDomain{T}(d1, d2)The lazy set difference of the given domains.
See also: setdiffdomain.
DomainSets.Sphere — Type
Supertype of spherical domains for which elements satisfy norm(x) == radius(sphere).
DomainSets.Sphere — Method
Sphere(radius = 1[, center])
Sphere{T}(radius = 1[, center])Return a concrete subtype of Sphere which represents a sphere with the given radius and center, and the given eltype T.
The default center is the origin. In case both radius and center are omitted, a subtype of UnitSphere is returned, whose concrete type depends on T.
A sphere represents the boundary of a ball. For the volume, see Ball().
DomainSets.StaticUnitBall — Type
StaticUnitBall()
StaticUnitBall{T}()
StaticUnitBall{T,C=:closed}()The open or closed unit ball with static dimension determined by the element type.
DomainSets.StaticUnitCube — Type
A unit cube that is specified by the element type T.
DomainSets.StaticUnitSimplex — Type
A unit simplex whose dimension is determined by its element type.
DomainSets.StaticUnitSphere — Type
The unit sphere with fixed dimension(s) specified by the element type.
DomainSets.SublevelSet — Type
The domain defined by f(x) <= C (or f(x) < C) for a given function f and constant C.
DomainSets.SubzeroSet — Type
The domain where f(x) <= 0 (or f(x) < 0).
DomainSets.SuperlevelSet — Type
The domain defined by f(x) >= C (or f(x) > C) for a given function f and constant C.
DomainSets.SuperzeroSet — Type
The domain where f(x) >= 0 (or f(x) > 0).
DomainSets.TupleProductDomain — Type
A TupleProductDomain is a product domain that concatenates the elements of its member domains in a tuple.
DomainSets.TypeDomain — Type
The domain of all objects of type T and all objects convertible exactly to type T.
DomainSets.UnionDomain — Type
UnionDomain(domains...)
UnionDomain{T}(domains...)The lazy union of the given domains.
See also: uniondomain.
DomainSets.UnitBall — Method
UnitBall([dim::Int])
UnitBall{T}([dim::Int])
UnitBall{T,C=:closed}([dim::Int])The open or closed volume of all points of type T with norm smaller than (or equal to) 1.
DomainSets.UnitCircle — Type
UnitCircle()
UnitCircle{T=Float64}()The unit circle in 2D, with element type SVector{2,T}.
DomainSets.UnitCube — Type
UnitCube()
UnitCube(::Val{N=3})
UnitCube(dim::Int)The d-dimensional domain $[0,1]^d$.
DomainSets.UnitDisk — Type
UnitDisk()
UnitDisk{T=Float64}()The closed unit disk in 2D, with element type SVector{2,T}.
DomainSets.UnitInterval — Type
UnitInterval()
UnitInterval{T=Float64}()The closed unit interval [0,1].
DomainSets.UnitSimplex — Type
UnitSimplex{T,C}A polytope with the origin and all unit vectors as vertices.
DomainSets.UnitSimplex — Method
UnitSimplex([dim::Int])
UnitSimplex{T}([dim::Int])
UnitSimplex{T,C=:closed}([dim::Int])The open or closed volume of all points of type x, for which the sum of components is smaller than (or equal to) 1.
The unit simplex has the origin and all Euclidean unit vector as vertices.
DomainSets.UnitSphere — Type
The unit sphere.
DomainSets.UnitSphere — Method
UnitSphere([dim::Int])
UnitSphere{T}([dim::Int])
UnitSphere{T,C=:closed}([dim::Int])The set of all points of type T with norm 1.
DomainSets.UnitSquare — Type
UnitSquare()
UnitSquare{T=Float64}()The domain $[0,1]^2$.
DomainSets.VcatDomain — Type
A VcatDomain concatenates the element types of its member domains in a single static vector.
DomainSets.VectorDomain — Type
A VectorDomain is any domain whose eltype is Vector{T}.
DomainSets.VectorProductDomain — Type
A VectorProductDomain is a product domain of arbitrary dimension where the element type is a vector, and all member domains have the same element type.
DomainSets.VectorUnitBall — Type
The unit ball with vector elements of a given dimension.
DomainSets.VectorUnitCube — Type
The unit cube with vector elements of a given dimension.
DomainSets.VectorUnitSphere — Type
The unit sphere with vector elements of a given dimension.
DomainSets.ZeroSet — Type
The domain defined by f(x)=0 for a given function f.