-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmanifold.py
More file actions
35 lines (35 loc) · 1000 Bytes
/
Copy pathmanifold.py
File metadata and controls
35 lines (35 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class Manifold:
def __init__(self):
raise NotImplemented
def size(self):
raise NotImplemented
def rand(self):
"""
sample a random point on the manifold
:return: random point on the manifold
"""
raise NotImplemented
def proj(self, x, z):
"""
orthogonal projection on the tangent
:param x: point on the manifold
:param z: point to be projected
:return: point on the tangent
"""
raise NotImplemented
def retr(self, x, v):
"""
retraction on the manifold
:param x: point on the manifold
:param v: point to be retracted
:return: point on the manifold
"""
raise NotImplemented
def egrad2rgrad(self, x, u):
"""
Euclidean gradient to Riemann gradient
:param x: point on the manifold
:param u: gradient vector
:return: projected gradient
"""
raise NotImplemented