# Graph manifold

For a given graph $G(V,E)$ implemented using Graphs.jl, the GraphManifold models a PowerManifold either on the nodes or edges of the graph, depending on the GraphManifoldType. i.e., it's either a $\mathcal M^{\lvert V \rvert}$ for the case of a vertex manifold or a $\mathcal M^{\lvert E \rvert}$ for the case of a edge manifold.

## Example

To make a graph manifold over $ℝ^2$ with three vertices and two edges, one can use

using Manifolds
using Graphs
M = Euclidean(2)
p = [[1., 4.], [2., 5.], [3., 6.]]
q = [[4., 5.], [6., 7.], [8., 9.]]
x = [[6., 5.], [4., 3.], [2., 8.]]
G = SimpleGraph(3)
N = GraphManifold(G, M, VertexManifold())
GraphManifold
Graph:
{3, 2} undirected simple Int64 graph
AbstractManifold on vertices:
Euclidean(2; field=ℝ)

It supports all AbstractPowerManifold operations (it is based on NestedPowerRepresentation) and furthermore it is possible to compute a graph logarithm:

incident_log(N, p)
3-element Vector{Vector{Float64}}:
[1.0, 1.0]
[0.0, 0.0]
[-1.0, -1.0]

## Types and functions

Manifolds.GraphManifoldType
GraphManifold{G,𝔽,M,T} <: AbstractPowerManifold{𝔽,M,NestedPowerRepresentation}

Build a manifold, that is a PowerManifold of the AbstractManifold M either on the edges or vertices of a graph G depending on the GraphManifoldType T.

Fields

• G is an AbstractSimpleGraph
• M is a AbstractManifold
source
Manifolds.incident_logMethod
incident_log(M::GraphManifold, x)

Return the tangent vector on the (vertex) GraphManifold, where at each node the sum of the logs to incident nodes is computed. For a SimpleGraph, an egde is interpreted as double edge in the corresponding SimpleDiGraph

If the internal graph is a SimpleWeightedGraph the weighted sum of the tangent vectors is computed.

source
ManifoldsBase.check_vectorMethod
check_vector(M::GraphManifold, p, X; kwargs...)

Check whether p is a valid point on the GraphManifold, and X it from its tangent space, i.e. its length equals the number of vertices (for VertexManifolds) or the number of edges (for EdgeManifolds) and that each element of X together with its corresponding entry of p passes the check_vector test for the base manifold M.manifold.

source
ManifoldsBase.manifold_dimensionMethod
manifold_dimension(N::GraphManifold{G,𝔽,M,EdgeManifold})

returns the manifold dimension of the GraphManifold N on the edges of a graph $G=(V,E)$, i.e.

$$$\dim(\mathcal N) = \lvert E \rvert \dim(\mathcal M),$$$

where $\mathcal M$ is the manifold of the data on the edges.

source
ManifoldsBase.manifold_dimensionMethod
manifold_dimension(N::GraphManifold{G,𝔽,M,VertexManifold})

returns the manifold dimension of the GraphManifold N on the vertices of a graph $G=(V,E)$, i.e.

$$$\dim(\mathcal N) = \lvert V \rvert \dim(\mathcal M),$$$

where $\mathcal M$ is the manifold of the data on the nodes.

source