| 4:e09437844ad9 | 5:f248e1434c3b |
|---|---|
| 1 | |
| 2 use alg_tools::euclidean::Euclidean; | |
| 1 | 3 |
| 2 /// A point on a manifold | 4 /// A point on a manifold |
| 3 pub trait ManifoldPoint : Clone + PartialEq { | 5 pub trait ManifoldPoint : Clone + PartialEq { |
| 4 // Type of tangent factors | 6 // Type of tangent factors |
| 5 type Tangent : Euclidean<f64, Output=Self::Tangent> + std::fmt::Debug; | 7 type Tangent : Euclidean<f64, Output=Self::Tangent> + std::fmt::Debug; |
| 7 /// Exponential map | 9 /// Exponential map |
| 8 fn exp(&self, tangent : &Self::Tangent) -> Self; | 10 fn exp(&self, tangent : &Self::Tangent) -> Self; |
| 9 | 11 |
| 10 /// Logarithmic map | 12 /// Logarithmic map |
| 11 fn log(&self, other : &Self) -> Self::Tangent; | 13 fn log(&self, other : &Self) -> Self::Tangent; |
| 14 | |
| 15 /// Distance to `other` | |
| 16 fn dist_to(&self, other : &Self) -> f64; | |
| 12 } | 17 } |
| 18 |