Vectorial Functions
This section provides several concrete vector functions that can be used for example to model constraints.
Functions
Manopt.VectorDifferentialFunction — Type
VectorDifferentialFunction{FT, JT, AT, F, J, A, I} <: AbstractFirstOrderVectorFunction{FT, JT}Represent a function $f:\mathcal{M} → ℝ^n$ including its first derivative information as its differential, and optionally its adjoint differential.
All three can be given either as single functions (FunctionVectorialType) or as vectors of functions (ComponentVectorialType).
Fields
value!::F: the cost function $f$, which can take different formatscost_type::AbstractVectorialType: indicating the format how the vector function is stored, e.g. as a single function (FunctionVectorialType, default) or as a vector of functions (ComponentVectorialType)jacobian!::J: the Jacobian $J_f$ of $f$jacobian_type::AbstractVectorialType: indicating / storing data for the type of $J_f$, e.g. as a single function (FunctionVectorialType, default), as a vector of functions (ComponentVectorialType), or as a function returning a matrix in coordinates at every point (CoefficientVectorialType)adjoint_jacobian!::A: the adjoint Jacobian $J_f^*$ of $f$, ormissingadjoint_jacobian_type::AT: the correspondingAbstractVectorialType, ormissingrange_dimension: the numbern, that is the size of the vector $f$ maps into.
Constructor
VectorDifferentialFunction(f, Jf, range_dimension; function_type::AbstractVectorialType=FunctionVectorialType(), jacobian_type::AbstractVectorialType=FunctionVectorialType(), evaluation::AbstractEvaluationType=AllocatingEvaluation(), p = missing,)VectorDifferentialFunction(f, Jf, aJf, range_dimension; function_type::AbstractVectorialType=FunctionVectorialType(), jacobian_type::AbstractVectorialType=FunctionVectorialType(), adjoint_jacobian_type::AbstractVectorialType=FunctionVectorialType(), evaluation::AbstractEvaluationType=AllocatingEvaluation(), p = missing,)Create a VectorDifferentialFunction of f and its Jacobian Jf, and optionally its adjoint Jacobian. If the adjoint is not provided, both it and its type are set to missing.
Manopt.VectorGradientFunction — Type
VectorGradientFunction{FT, JT, F, J, I} <: AbstractVectorGradientFunction{FT, JT}Represent a function $f:\mathcal{M} → ℝ^n$ including its first derivative, either as a vector of gradients or as a Jacobian.
Writing $f$ in its component functions $f_i: \mathcal{M} → ℝ$, $i=1,…,n$, each of them has a gradient $\operatorname{grad} f_i(p) ∈ T_{p}\mathcal{M}$. Putting these gradients into a vector the same way as the functions, yields a ComponentVectorialType
\[\operatorname{grad} f(p) = \Bigl( \operatorname{grad} f_1(p), \operatorname{grad} f_2(p), …, \operatorname{grad} f_n(p) \Bigr)^\mathrm{T} ∈ (T_{p}\mathcal{M})^n\]
An advantage here is that the single components can again be evaluated individually.
Fields
value!::F: the cost function $f$, which can take different formatscost_type::AbstractVectorialType: indicating the format how the vector function is stored, e.g. as a single function (FunctionVectorialType, default) or as a vector of functions (ComponentVectorialType)jacobian!::J: the Jacobian $J_f$ of $f$jacobian_type::AbstractVectorialType: indicating / storing data for the type of $J_f$, e.g. as a single function (FunctionVectorialType, default) returning a vector of tangent vectors, as a vector of functions (ComponentVectorialType) returning a tangent vector each, or as a function returning a matrix in coordinates at every point (CoefficientVectorialType)range_dimension: the numbern, that is the size of the vector $f$ maps into.
Constructor
VectorGradientFunction(f, Jf, range_dimension; function_type::AbstractVectorialType=FunctionVectorialType(), jacobian_type::AbstractVectorialType=FunctionVectorialType(), evaluation::AbstractEvaluationType=AllocatingEvaluation(), p = missing,)Create a VectorGradientFunction of f and its Jacobian (vector of gradients) Jf, where f maps into the Euclidean space of dimension range_dimension. Their types are specified by the function_type, and jacobian_type, respectively. The Jacobian can further be given as an allocating variant or an in-place variant, specified by the evaluation= keyword.
Manopt.VectorHessianFunction — Type
VectorHessianFunction{FT, JT, HT, F, J, H, I} <: AbstractVectorGradientFunction{FT, JT}Represent a function $f:\mathcal{M} → ℝ^n$ including its first derivative, either as a vector of gradients or as a Jacobian, and the Hessian, as a vector of Hessians of the component functions.
Both the Jacobian and the Hessian can map into either a sequence of tangent spaces or a single tangent space of the power manifold of length n.
Fields
value!::F: the cost function $f$, which can take different formatscost_type::AbstractVectorialType: indicating / storing data for the type offjacobian!::J: the Jacobian $J_f$ of $f$jacobian_type::AbstractVectorialType: indicating / storing data for the type of $J_f$hessians!::H: the Hessians of $f$ (in a component wise sense)hessian_type::AbstractVectorialType: indicating / storing data for the type of $H_f$range_dimension: the numbern, that is the size of the vector $f$ maps into.
Constructor
VectorHessianFunction(f, Jf, Hf, range_dimension; function_type::AbstractVectorialType=FunctionVectorialType(), jacobian_type::AbstractVectorialType=FunctionVectorialType(), hessian_type::AbstractVectorialType=FunctionVectorialType(), evaluation::AbstractEvaluationType=AllocatingEvaluation(), p = missing,)Create a VectorHessianFunction of f and its Jacobian (vector of gradients) Jf and (vector of) Hessians, where f maps into the Euclidean space of dimension range_dimension. Their types are specified by the function_type, and jacobian_type, and hessian_type, respectively. The Jacobian and Hessian can further be given as an allocating variant or an inplace-variant, specified by the evaluation= keyword.
Manopt.get_hessian — Function
get_hessian(M::AbstractManifold, vhf::VectorHessianFunction, p, X, i)
get_hessian(M::AbstractManifold, vhf::VectorHessianFunction, p, X, i, range)
get_hessian!(M::AbstractManifold, Y, vhf::VectorHessianFunction, p, X, i)
get_hessian!(M::AbstractManifold, Y, vhf::VectorHessianFunction, p, X, i, range)Evaluate the Hessians of the vector function vhf on the manifold M at p in direction X, for the components selected by i. The optional range specifies the representation in which the resulting Hessians are returned. This can be computed in-place of Y.
Since i is assumed to be a linear index, you can provide
- a single integer
- a
UnitRangeto specify a range to be returned like1:3 - a
BitVectorspecifying a selection - an
AbstractVector{<:Integer}to specify indices :to return the vector of all Hessian evaluations
Internals
Manopt.get_value_function — Function
get_value_function(vgf::VectorGradientFunction, recursive=false; evaluation=AllocatingEvaluation())Return the internally stored function computing get_value.