| 2 Abstract traits for manifolds. |
2 Abstract traits for manifolds. |
| 3 */ |
3 */ |
| 4 |
4 |
| 5 use serde::Serialize; |
5 use serde::Serialize; |
| 6 use alg_tools::euclidean::Euclidean; |
6 use alg_tools::euclidean::Euclidean; |
| |
7 use alg_tools::instance::{Space, BasicDecomposition}; |
| 7 |
8 |
| 8 /// A point on a manifold |
9 /// A point on a manifold |
| 9 pub trait ManifoldPoint : Clone + PartialEq { |
10 pub trait ManifoldPoint : Space<Decomp=BasicDecomposition> + Clone + PartialEq { |
| 10 // Type of tangent factors |
11 // Type of tangent factors |
| 11 type Tangent : Euclidean<f64, Output=Self::Tangent> + std::fmt::Debug + Serialize; |
12 type Tangent : Euclidean<f64, Output=Self::Tangent> + std::fmt::Debug + Serialize; |
| 12 |
13 |
| 13 /// Exponential map |
14 /// Exponential map |
| 14 fn exp(self, tangent : &Self::Tangent) -> Self; |
15 fn exp(self, tangent : &Self::Tangent) -> Self; |