pub struct LorentzModel<T> {
pub c: T,
}Expand description
Lorentz (hyperboloid) model manifold.
Points live in (\mathbb{R}^{d+1}): the first component (x_0) is the “time” coordinate (always positive), the remaining (x_1, \ldots, x_d) are “space” coordinates. All points satisfy the hyperboloid constraint (\langle x, x \rangle_\mathcal{L} = -1/c).
The origin of hyperbolic space is the “north pole” ((1/\sqrt{c}, 0, \ldots, 0)).
Fields§
§c: TCurvature parameter (c > 0). The hyperboloid satisfies <x,x>_L = -1/c.
Implementations§
Source§impl<T> LorentzModel<T>
impl<T> LorentzModel<T>
Sourcepub fn minkowski_dot(&self, x: &ArrayView1<'_, T>, y: &ArrayView1<'_, T>) -> T
pub fn minkowski_dot(&self, x: &ArrayView1<'_, T>, y: &ArrayView1<'_, T>) -> T
Minkowski inner product: (\langle x, y \rangle_\mathcal{L} = -x_0 y_0 + \sum_{i=1}^d x_i y_i).
This is the indefinite bilinear form with signature ((-,+,+,\ldots,+)). For points on the hyperboloid, (\langle x, x \rangle_\mathcal{L} = -1/c).
Sourcepub fn distance(&self, x: &ArrayView1<'_, T>, y: &ArrayView1<'_, T>) -> T
pub fn distance(&self, x: &ArrayView1<'_, T>, y: &ArrayView1<'_, T>) -> T
Geodesic distance: (d_c(x,y) = \frac{1}{\sqrt{c}},\mathrm{arcosh}(-c\langle x,y\rangle_\mathcal{L})).
Uses a Taylor expansion (\mathrm{arcosh}(1+\delta) \approx \sqrt{2\delta}) near (\delta = 0) for numerical stability when (x \approx y).
Sourcepub fn is_on_manifold(&self, x: &ArrayView1<'_, T>, tol: T) -> bool
pub fn is_on_manifold(&self, x: &ArrayView1<'_, T>, tol: T) -> bool
Check if point is on the hyperboloid: <x,x>_L = -1/c
Sourcepub fn project(&self, x: &ArrayView1<'_, T>) -> Array1<T>
pub fn project(&self, x: &ArrayView1<'_, T>) -> Array1<T>
Project point onto hyperboloid by scaling. Given x with x_0 > 0, find scale s such that <sx, sx>_L = -1/c.
Sourcepub fn from_euclidean(&self, v: &ArrayView1<'_, T>) -> Array1<T>
pub fn from_euclidean(&self, v: &ArrayView1<'_, T>) -> Array1<T>
Project from Euclidean space to hyperboloid. Maps an n-dimensional Euclidean vector to the (n+1)-dimensional hyperboloid.
Sourcepub fn to_euclidean(&self, x: &ArrayView1<'_, T>) -> Array1<T>
pub fn to_euclidean(&self, x: &ArrayView1<'_, T>) -> Array1<T>
Project from hyperboloid to Euclidean space (gnomonic projection). Maps an (n+1)-dimensional hyperboloid point to n-dimensional Euclidean.
Sourcepub fn exp_map(&self, x: &ArrayView1<'_, T>, v: &ArrayView1<'_, T>) -> Array1<T>
pub fn exp_map(&self, x: &ArrayView1<'_, T>, v: &ArrayView1<'_, T>) -> Array1<T>
Exponential map at point x: maps tangent vector v to manifold. exp_x(v) = cosh(||v||_L) * x + sinh(||v||_L) * v / ||v||_L where ||v||_L = sqrt(<v,v>_L) (Lorentzian norm of tangent vector).
Sourcepub fn log_map(&self, x: &ArrayView1<'_, T>, y: &ArrayView1<'_, T>) -> Array1<T>
pub fn log_map(&self, x: &ArrayView1<'_, T>, y: &ArrayView1<'_, T>) -> Array1<T>
Logarithmic map at point x: maps manifold point y to tangent space at x. log_x(y) = d(x,y) * (y - <x,y>_L * c * x) / ||y - <x,y>_L * c * x||_L
Sourcepub fn parallel_transport(
&self,
x: &ArrayView1<'_, T>,
y: &ArrayView1<'_, T>,
v: &ArrayView1<'_, T>,
) -> Array1<T>
pub fn parallel_transport( &self, x: &ArrayView1<'_, T>, y: &ArrayView1<'_, T>, v: &ArrayView1<'_, T>, ) -> Array1<T>
Parallel transport of tangent vector v from point x to point y.