src/manifold.rs

changeset 56
34f8ec636368
parent 37
d7cd14b8ccc0
equal deleted inserted replaced
55:15f01efc034b 56:34f8ec636368
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;

mercurial