pub struct LorentzModel<T> {
pub c: T,
}Expand description
Lorentz (hyperboloid) model manifold.
Points are represented as (n+1)-dimensional vectors where the first component is the “time” coordinate and the rest are “space” coordinates.
Fields§
§c: TCurvature parameter (c > 0). The hyperboloid satisfies <x,x>_L = -1/c.
Implementations§
Source§impl<T> LorentzModel<T>
impl<T> LorentzModel<T>
pub fn new(c: T) -> Self
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: <x,y>_L = -x_0y_0 + x_1y_1 + … + x_n*y_n
Sourcepub fn distance(&self, x: &ArrayView1<'_, T>, y: &ArrayView1<'_, T>) -> T
pub fn distance(&self, x: &ArrayView1<'_, T>, y: &ArrayView1<'_, T>) -> T
Lorentzian distance: d(x,y) = (1/sqrt(c)) * arcosh(-c * <x,y>_L)
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.