Vectorial Functions

This section provides several concrete vector functions that can be used for example to model constraints.

Functions

Manopt.VectorDifferentialFunctionType
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

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.

source
Manopt.VectorGradientFunctionType
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

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.

source
Manopt.VectorHessianFunctionType
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 formats
  • cost_type::AbstractVectorialType: indicating / storing data for the type of f
  • jacobian!::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 number n, 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.

source
Manopt.get_hessianFunction
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 UnitRange to specify a range to be returned like 1:3
  • a BitVector specifying a selection
  • an AbstractVector{<:Integer} to specify indices
  • : to return the vector of all Hessian evaluations
source

Internals