src/manifold.rs

Sat, 19 Oct 2024 10:46:13 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sat, 19 Oct 2024 10:46:13 -0500
changeset 5
f248e1434c3b
parent 3
ff4656da04af
child 6
df9628092285
permissions
-rw-r--r--

Some distance functions etc.

5
f248e1434c3b Some distance functions etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 3
diff changeset
1
f248e1434c3b Some distance functions etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 3
diff changeset
2 use alg_tools::euclidean::Euclidean;
0
989e2fe08db2 Basic cube logarithm
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
3
989e2fe08db2 Basic cube logarithm
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
4 /// A point on a manifold
989e2fe08db2 Basic cube logarithm
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
5 pub trait ManifoldPoint : Clone + PartialEq {
989e2fe08db2 Basic cube logarithm
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
6 // Type of tangent factors
3
ff4656da04af Sketch exp
Tuomo Valkonen <tuomov@iki.fi>
parents: 0
diff changeset
7 type Tangent : Euclidean<f64, Output=Self::Tangent> + std::fmt::Debug;
0
989e2fe08db2 Basic cube logarithm
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
8
989e2fe08db2 Basic cube logarithm
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
9 /// Exponential map
989e2fe08db2 Basic cube logarithm
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
10 fn exp(&self, tangent : &Self::Tangent) -> Self;
989e2fe08db2 Basic cube logarithm
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
11
989e2fe08db2 Basic cube logarithm
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
12 /// Logarithmic map
989e2fe08db2 Basic cube logarithm
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
13 fn log(&self, other : &Self) -> Self::Tangent;
5
f248e1434c3b Some distance functions etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 3
diff changeset
14
f248e1434c3b Some distance functions etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 3
diff changeset
15 /// Distance to `other`
f248e1434c3b Some distance functions etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 3
diff changeset
16 fn dist_to(&self, other : &Self) -> f64;
0
989e2fe08db2 Basic cube logarithm
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
17 }
5
f248e1434c3b Some distance functions etc.
Tuomo Valkonen <tuomov@iki.fi>
parents: 3
diff changeset
18

mercurial