1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// ~/cartan/cartan-core/src/lib.rs
//! # cartan-core
//!
//! Core trait definitions for Riemannian geometry.
//!
//! This crate defines the foundational traits that all cartan manifolds,
//! optimizers, and tools depend on. It has minimal dependencies (only `rand`
//! for the Rng trait bound) and can be used standalone by downstream crates
//! that want to implement custom manifolds against the cartan trait system.
//!
//! ## Trait hierarchy
//!
//! ```text
//! Manifold (base: exp, log, inner, project, validate)
//! |
//! +-- Retraction (cheaper exp approximation)
//! +-- ParallelTransport -> VectorTransport (blanket impl)
//! +-- Connection (Riemannian Hessian)
//! | |
//! | +-- Curvature (Riemann tensor, Ricci, scalar)
//! +-- GeodesicInterpolation (gamma(t) sampling)
//! ```
//!
//! ## The `Real` type alias
//!
//! All floating-point computation uses `Real`, currently aliased to `f64`.
//! This exists so that a future version can generify over `T: Scalar`
//! with a mechanical find-and-replace refactor.
extern crate alloc;
/// The floating-point type used throughout cartan.
///
/// Currently f64. Designed so that replacing this alias with a generic
/// type parameter `T: Scalar` is a mechanical refactor when f32 support
/// is needed. All structs and functions use `Real` instead of `f64` directly.
pub type Real = f64;
// Re-exports for convenience.
pub use ;
pub use Connection;
pub use Curvature;
pub use CartanError;
pub use ;
pub use VecSection;
pub use GeodesicInterpolation;
pub use Manifold;
pub use Retraction;
pub use ;