Sat, 19 Oct 2024 10:46:13 -0500
Some distance functions etc.
| 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 | |
| 10 | fn exp(&self, tangent : &Self::Tangent) -> Self; | |
| 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; | |
| 0 | 17 | } |
| 5 | 18 |