The Matlab class manifold
represents a manifold in general and handles
directly also everything as a product manifold using the vector and matrix
features of Matlab.
All manifolds inherit from manifold, such that both the algorithms and several functions within the manifold are based on the following basic properties a child class should implement.
Variables
AllDims
 an cell array of
:
strings with the length equal to the length ofItemSize
– for internal use, but must be initialized within the constructor. Dimension
 an integer specifying the dimension of the finite dimensional Riemannian manifold.
ItemSize
 The information on
size(x)
whenx
is a single point on the manifold. note that data is always stored with the manifold dimensions first, so an arrayX
ofn
manifold points hassize(X) = [ItemSize,n]
. type
 a String representing the manifold mainly in debug informations
Abstract Functions
The following functions are the basic functions not only necessary for most algoeithms but also as the basis for forthcoming algorithms to base functions
on these. If they are easy functions, they should be implemented within this class. In order to perform algorithms on images, these functions should always
also be able to handle arbitrary sized arrays of manifoldpoints (see ItemSize
above) and return the corresponding arrays.
dist(x,y)
 distance function of two points (vectors of points) on a manifold, returns an array of the data dimensions.
dot(x,xi,nu)
 inner product in of two tangent vectors .
exp(x,xi)
 the exponential map at with direction might optionally be extended by a further parameter to scale before applying the exponential map
log(x,y)
 the logarithmic map (or inverse exponential); though defined only locally it should return something deterministic otherwise, i.e. choose one of the possible values if the logaithm is not unique.
parallelTransport(x,y,xi)
 parallel transport a vector from the tangent space of to the tangent space of .
Functions
 The adjoint differential of the exponential map base point

1
% nu = AdjDxExp(x,xi,eta)  Adjoint of the Derivative of Exp with
This function evaluates for with fixed the adjoint differenital
more The adjoint differential of the start point of a geodesic

1
% AdjDxGeo(x,y,t,eta) Adjoint of the Derivative of geo(x,y,t) wrt x.
This function evaluates for with fixed and the adjoint differenital
more The adjoint differential of the logarithmic map base point

1
% nu = AdjDxLog(x,y,eta)  Adjoint of the Derivative of Log
This function evaluates for with fixed the adjoint differenital
more The adjoint differential of the exponential map

1
% nu = AdjDxExp(x,xi,eta)  Adjoint of the Derivative of Exp with
This function evaluates for with fixed the adjoint differenital
more The adjoint differential of the end point of a geodesic

1
% AdjDyGeo(x,y,t,eta)  Adjoint of the Derivative of geo(x,y,t) wrt y.
This function evaluates for with fixed and the adjoint differenital
more The adjoint differential of the logarithmic map base point

1
% nu = AdjDxLog(x,y,eta)  Adjoint of the Derivative of Log
This function evaluates for with fixed the adjoint differenital
more Adjoint Jacobi field

1
% AdjJacobiField(x,y,t,eta)  evaluate a adjoint of a Jacobi field
Evaluates the adjoint of the Jacobi field along the geodesic at with initial conditions .
more The differential of the exponential map base point

1
% nu = AdjDxExp(x,xi,eta)  Derivative of Exp w.r.t. base point x
This function evaluates for with fixed the differenital
more The differential of the start point of a geodesic

1
% xi = DxGeo(x,y,t,eta)  Compute the Derivative D_xGeo(t; x,y)[eta]
This function evaluates for with fixed and the differenital
more The differential of the logarithmic map base point

1
% nu = AdjDxExp(x,xi,eta)  Derivative of Exp w.r.t. base point x
This function evaluates for with fixed the differenital
more The differential of the exponential

1
% nu = DxExp(x,xi,eta)  Derivative of Exp w.r.t. xi
This function evaluates for with fixed the differenital
more The differential of the end point of a geodesic

1
% xi = DxGeo(x,y,t,eta) Derivative of the geodesic(x,y,t) wrt y.
This function evaluates for with fixed and the differenital
more The differential of the logarithmic map

1
% nu = DyLog(x,y,eta)  Adjoint of the Derivative of Log
This function evaluates for with fixed the differenital
more Jacobi field

1
% xi = JacobiField(x,y,t,eta)  evaluate a Jacobi field
For the geodesic to a Jacobi field is a smooth vector field along fulfilling the ODE
where denotes the (partial) covariant derivative, is the curvature tensor and is a geodesic variation, , i.e. for any the function is a geodesic; and we have .
This function evaluates certain special Jacobi fields given a weight function , where refers to the index of the eigenvalue, and
more Filter an image

1
% filteredImage = filter(this,image,filter)
This function performs a convolution or filtering of an image by reinterpreting the weightde sum in the convolution as a Karcher mean. For a given filter , this function computes
where adress a pixel of the image and one can specify boundary conditions (nearest, symmetric or periodic).
more The geodesic

1
% geo = geodesic(this,x,y)
Returns evaluations of the geodesic , either equidistant at
pts
points (which is set to100
) by default. Ift
is given as a vector of evaluation poitns, this one dominates. A point on the geodesic

1
% geopoint(x,y,t)  Gives the point \gamma_{x,y}(t)
The function evaluates a geodesic at , i.e. returns by using the exponential and logarithmic map. When the geodesic is not unique this function still returns a deterministic single value based on the choice of the logarithmic map. This also allows for evaluating the geodesic of an image pixelwise, i.e. if are images, we obtain a pixelwise evaluation.
 The Riemannian center of mass

1
% mean(x) calculates the m means of the input data x [.,m,n]
The Riemannian center of mass can be computed for a matrix of
morem x n
points, which computedn
means simultaneously ofm
points each. The mean of one such set is defined as a (not necessarily unique) minimizer of The Riemannian median

1
% median(x) calculates the m medians of x ([.,m,n])
The Riemannian median can be defined similarly to the mean, the Riemannian center of mass. We compute for a matrix of
morem x n
pointsm
medians in parallel, each consisting ofn
points. The median of one such set is defined as a (not necessarily unique) minimizer of The mid point on a geodesic

1
% m = midPoint(x,z)
The function returns a mid point of the two input points. Since the logarithm is deterministic and returns a unique value, this function is also deterministic, though the mid point might not be unique.
more Pole Ladder – approximate parallel transport

1
% poleladder(this,x,y,xi) approximates parallel Transport
The pole ladder is a way to approximate the parallel transport of a tangent vector to since the original function might be hard to compute. Schild’s ladder is given by the formula
more Schild’s Ladder – approximate parallel transport

1
% schildsladder(this,x,y,xi) approximates parallel Transport
Schild’s ladder is a way to approximate the parallel transport of a tangent vector to since the original function might be hard to compute. Schild’s ladder is given by the formula
more Variance

1
% var(f) computes the empirical variance
Compute the variance of the data, i.e. the mean distance to the mean.
For given data let denote the Riemannian center of mass. Then the variance is given by
more