Mon, 21 Oct 2024 23:07:01 -0500
Basic face image export
5 | 1 | |
2 | use alg_tools::euclidean::Euclidean; | |
0 | 3 | |
4 | /// A point on a manifold | |
5 | pub trait ManifoldPoint : Clone + PartialEq { | |
6 | // Type of tangent factors | |
3 | 7 | type Tangent : Euclidean<f64, Output=Self::Tangent> + std::fmt::Debug; |
0 | 8 | |
9 | /// Exponential map | |
8 | 10 | fn exp(self, tangent : &Self::Tangent) -> Self; |
0 | 11 | |
12 | /// Logarithmic map | |
13 | fn log(&self, other : &Self) -> Self::Tangent; | |
5 | 14 | |
15 | /// Distance to `other` | |
16 | fn dist_to(&self, other : &Self) -> f64; | |
6
df9628092285
Add a zero function on manifolds
Tuomo Valkonen <tuomov@iki.fi>
parents:
5
diff
changeset
|
17 | |
df9628092285
Add a zero function on manifolds
Tuomo Valkonen <tuomov@iki.fi>
parents:
5
diff
changeset
|
18 | /// Return the zero tangent at `self`. |
df9628092285
Add a zero function on manifolds
Tuomo Valkonen <tuomov@iki.fi>
parents:
5
diff
changeset
|
19 | fn tangent_origin(&self) -> Self::Tangent; |
0 | 20 | } |
5 | 21 | |
7 | 22 | /// Point on a manifold that possesses displayable embedded coordinates. |
23 | pub trait EmbeddedManifoldPoint : ManifoldPoint + std::fmt::Debug { | |
24 | type EmbeddedCoords : std::fmt::Display; | |
25 | ||
26 | /// Convert a point on a manifold into embedded coordinates | |
27 | fn embedded_coords(&self) -> Self::EmbeddedCoords; | |
28 | } |