# Cost Functions

The following cost functions are available

`Manopt.costIntrICTV12`

— Method`costIntrICTV12(M, f, u, v, α, β)`

Compute the intrinsic infimal convolution model, where the addition is replaced by a mid point approach and the two functions involved are `costTV2`

and `costTV`

. The model reads

`Manopt.costL2TV`

— Method`costL2TV(M, f, α, x)`

compute the $\ell^2$-TV functional on the `PowerManifold manifold`

M`for given (fixed) data`

f`(on`

M`), a nonnegative weight`

α`, and evaluated at`

x`(on`

M`), i.e.

**See also**

`Manopt.costL2TV2`

— Method`costL2TV2(M, f, β, x)`

compute the $\ell^2$-TV2 functional on the `PowerManifold`

manifold `M`

for given data `f`

, nonnegative parameter `β`

, and evaluated at `x`

, i.e.

**See also**

`Manopt.costL2TVTV2`

— Method`costL2TVTV2(M, f, α, β, x)`

compute the $\ell^2$-TV-TV2 functional on the `PowerManifold`

manifold `M`

for given (fixed) data `f`

(on `M`

), nonnegative weight `α`

, `β`

, and evaluated at `x`

(on `M`

), i.e.

**See also**

`Manopt.costTV`

— Function`costTV(M,x [,p=2,q=1])`

Compute the $\operatorname{TV}^p$ functional for data `x`

on the `PowerManifold`

manifold `M`

, i.e. $\mathcal M = \mathcal N^n$, where $n ∈ \mathbb N^k$ denotes the dimensions of the data `x`

. Let $\mathcal I_i$ denote the forward neighbors, i.e. with $\mathcal G$ as all indices from $\mathbf{1} ∈ \mathbb N^k$ to $n$ we have $\mathcal I_i = \{i+e_j, j=1,\ldots,k\}\cap \mathcal G$. The formula reads

**See also**

`Manopt.costTV`

— Method`costTV(M, x, p)`

Compute the $\operatorname{TV}^p$ functional for a tuple `pT`

of pointss on a Manifold `M`

, i.e.

**See also**

`Manopt.costTV2`

— Function`costTV2(M,x [,p=1])`

compute the $\operatorname{TV}_2^p$ functional for data `x`

on the `PowerManifold`

manifoldmanifold `M`

, i.e. $\mathcal M = \mathcal N^n$, where $n ∈ \mathbb N^k$ denotes the dimensions of the data `x`

. Let $\mathcal I_i^{\pm}$ denote the forward and backward neighbors, respectively, i.e. with $\mathcal G$ as all indices from $\mathbf{1} ∈ \mathbb N^k$ to $n$ we have $\mathcal I^\pm_i = \{i\pm e_j, j=1,\ldots,k\}\cap \mathcal I$. The formula then reads

where $c_i(\cdot,\cdot)$ denotes the mid point between its two arguments that is nearest to $x_i$.

**See also**

`Manopt.costTV2`

— Method`costTV2(M,(x1,x2,x3) [,p=1])`

Compute the $\operatorname{TV}_2^p$ functional for the 3-tuple of points `(x1,x2,x3)`

on the Manifold `M`

. Denote by

the set of mid points between $x_1$ and $x_3$. Then the functionr reads

**See also**

`Manopt.cost_L2_acceleration_bezier`

— Method`cost_L2_acceleration_bezier(M,B,pts,λ,d)`

compute the value of the discrete Acceleration of the composite Bezier curve together with a data term, i.e.

where for this formula the `pts`

along the curve are equispaced and denoted by $t_i$ and $d_2$ refers to the second order absolute difference `costTV2`

(squared), the junction points are denoted by $p_i$, and to each $p_i$ corresponds one data item in the manifold points given in `d`

. For details on the acceleration approximation, see `cost_acceleration_bezier`

. Note that the Beziér-curve is given in reduces form as a point on a `PowerManifold`

, together with the `degrees`

of the segments and assuming a differentiable curve, the segmenents can internally be reconstructed.

**See also**

`∇L2_acceleration_bezier`

, `cost_acceleration_bezier`

, `∇acceleration_bezier`

`Manopt.cost_acceleration_bezier`

— Method```
cost_acceleration_bezier(
M::Manifold,
B::AbstractVector{P},
degrees::AbstractVector{<:Integer},
T::AbstractVector{<:AbstractFloat},
) where {P}
```

compute the value of the discrete Acceleration of the composite Bezier curve

where for this formula the `pts`

along the curve are equispaced and denoted by $t_i$, $i=1,\ldots,N$, and $d_2$ refers to the second order absolute difference `costTV2`

(squared). Note that the Beziér-curve is given in reduces form as a point on a `PowerManifold`

, together with the `degrees`

of the segments and assuming a differentiable curve, the segmenents can internally be reconstructed.

This acceleration discretization was introduced in^{[BergmannGousenbourger2018]}.

**See also**

`∇acceleration_bezier`

, `cost_L2_acceleration_bezier`

, `∇L2_acceleration_bezier`

- BergmannGousenbourger2018
Bergmann, R. and Gousenbourger, P.-Y.: A variational model for data fitting on manifolds by minimizing the acceleration of a Bézier curve. Frontiers in Applied Mathematics and Statistics (2018). doi 10.3389/fams.2018.00059, arXiv: 1807.10090