Hyperrectangle
Hyperrectangle is a manifold with corners [Joy10], and also a subset of the real Euclidean manifold. It is useful for box-constrained optimization, for example it is implicitly used in the classic L-BFGS-B algorithm.
This is a manifold with corners. Some parts of its interface specific to this property are experimental and may change without a breaking release.
Manifolds.Hyperrectangle โ TypeHyperrectangle{T} <: AbstractManifold{โ}Hyperrectangle, also known as orthotope or box. This is a manifold with corners [Joy10] with the standard Euclidean metric.
Constructor
Hyperrectangle(lb::AbstractArray, ub::AbstractArray)Generate the hyperrectangle of arrays such that each element of the array is between lower and upper bound with the same index.
Base.exp โ Methodexp(M::Hyperrectangle, p, X)Compute the exponential map on the Hyperrectangle manifold M from p in direction X, which in this case is just
\[\exp_p X = p + X.\]
Base.log โ Methodlog(M::Hyperrectangle, p, q)Compute the logarithmic map on the Hyperrectangle M from p to q, which in this case is just
\[\log_p q = q-p.\]
LinearAlgebra.norm โ Methodnorm(M::Hyperrectangle, p, X)Compute the norm of a tangent vector X at p on the Hyperrectangle M, i.e. since every tangent space can be identified with M itself in this case, just the (Frobenius) norm of X.
Manifolds.manifold_volume โ Methodmanifold_volume(::Hyperrectangle)Return volume of the Hyperrectangle manifold, i.e. infinity.
Manifolds.volume_density โ Methodvolume_density(M::Hyperrectangle, p, X)Return volume density function of Hyperrectangle manifold M, i.e. 1.
ManifoldsBase.Weingarten โ MethodY = Weingarten(M::Hyperrectangle, p, X, V)
Weingarten!(M::Hyperrectangle, Y, p, X, V)Compute the Weingarten map $\mathcal W_p$ at p on the Hyperrectangle M with respect to the tangent vector $X \in T_p\mathcal M$ and the normal vector $V \in N_p\mathcal M$.
Since this a flat space by itself, the result is always the zero tangent vector.
ManifoldsBase.default_retraction_method โ Methoddefault_retraction_method(M::Hyperrectangle)Return ProjectionRetraction as the default retraction for the Hyperrectangle manifold.
ManifoldsBase.distance โ Methoddistance(M::Hyperrectangle, p, q)Compute the euclidean distance between two points on the Hyperrectangle manifold M, i.e. for vectors it's just the norm of the difference, for matrices and higher order arrays, the matrix and tensor Frobenius norm, respectively.
ManifoldsBase.embed โ Methodembed(M::Hyperrectangle, p, X)Embed the tangent vector X at point p in M. Equivalent to an identity map.
ManifoldsBase.embed โ Methodembed(M::Hyperrectangle, p)Embed the point p in M. Equivalent to an identity map.
ManifoldsBase.injectivity_radius โ Methodinjectivity_radius(M::Hyperrectangle, p)Return the injectivity radius on the Hyperrectangle M at point p, which is the distance to the nearest boundary the point is not on.
ManifoldsBase.inner โ Methodinner(M::Hyperrectangle, p, X, Y)Compute the inner product on the Hyperrectangle M, which is just the inner product on the real-valued vector space of arrays (or tensors) of size $n_1 ร n_2 ร โฆ ร n_i$, i.e.
\[g_p(X,Y) = \sum_{k โ I} X_{k} Y_{k},\]
where $I$ is the set of vectors $k โ โ^i$, such that for all
$i โค j โค i$ it holds $1 โค k_j โค n_j$.
For the special case of $i โค 2$, i.e. matrices and vectors, this simplifies to
\[g_p(X,Y) = \operatorname{tr}(X^{\mathrm{T}}Y),\]
where $โ ^{\mathrm{T}}$ denotes transposition.
ManifoldsBase.is_flat โ Methodis_flat(::Hyperrectangle)Return true. Hyperrectangle is a flat manifold.
ManifoldsBase.manifold_dimension โ Methodmanifold_dimension(M::Hyperrectangle)Return the manifold dimension of the Hyperrectangle M, i.e. the product of all array dimensions.
ManifoldsBase.parallel_transport_direction โ Methodparallel_transport_direction(M::Hyperrectangle, p, X, d)the parallel transport on Hyperrectangle is the identity, i.e. returns X.
ManifoldsBase.parallel_transport_to โ Methodparallel_transport_to(M::Hyperrectangle, p, X, q)the parallel transport on Hyperrectangle is the identity, i.e. returns X.
ManifoldsBase.project โ Methodproject(M::Hyperrectangle, p, X)Project an arbitrary vector X into the tangent space of a point p on the Hyperrectangle M, which is just the identity, since any tangent space of M can be identified with all of M.
ManifoldsBase.project โ Methodproject(M::Hyperrectangle, p)Project an arbitrary point p onto the Hyperrectangle manifold M, which is of course just the identity map.
ManifoldsBase.representation_size โ Methodrepresentation_size(M::Hyperrectangle)Return the array dimensions required to represent an element on the Hyperrectangle M, i.e. the vector of all array dimensions.
ManifoldsBase.riemann_tensor โ Methodriemann_tensor(M::Hyperrectangle, p, X, Y, Z)Compute the Riemann tensor $R(X,Y)Z$ at point p on Hyperrectangle manifold M. Its value is always the zero tangent vector.
ManifoldsBase.sectional_curvature โ Methodsectional_curvature(::Hyperrectangle, p, X, Y)Sectional curvature of Hyperrectangle manifold M is 0.
ManifoldsBase.sectional_curvature_max โ Methodsectional_curvature_max(::Hyperrectangle)Sectional curvature of Hyperrectangle manifold M is 0.
ManifoldsBase.sectional_curvature_min โ Methodsectional_curvature_min(M::Hyperrectangle)Sectional curvature of Hyperrectangle manifold M is 0.
ManifoldsBase.vector_transport_to โ Methodvector_transport_to(M::Hyperrectangle, p, X, q, ::AbstractVectorTransportMethod)Transport the vector X from the tangent space at p to the tangent space at q on the Hyperrectangle M, which simplifies to the identity.
ManifoldsBase.zero_vector โ Methodzero_vector(M::Hyperrectangle, p)Return the zero vector in the tangent space of p on the Hyperrectangle M, which here is just a zero filled array the same size as p.
Literature
- [Joy10]
- D.ย Joyce. On manifolds with corners (2010), arXiv:0910.3518.