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