skel
Manifold and topology primitives.
Problem
ODE integrators, gradient descent, and interpolation on curved spaces (spheres, hyperbolic planes, tori) need three operations: step along a geodesic (exp), find the direction between two points (log), and carry vectors between tangent spaces (parallel_transport). These operations vary per geometry, but the code that uses them does not.
skel defines the Manifold trait so that one ODE integrator or optimizer works on any geometry. It also provides Simplex for oriented simplicial complexes with boundary computation.
Manifold trait
Any Riemannian geometry implements four methods:
use Manifold;
use ;
; // S^1 embedded in R^2
Concrete implementations exist for the Poincare ball and Lorentz hyperboloid.
Simplex
Oriented simplices with boundary computation. The chain complex identity (dd = 0) holds by construction:
use Simplex;
let tri = new_canonical.unwrap;
assert_eq!;
assert_eq!; // three oriented edges
Tests
12 tests covering simplex construction, boundary orientation, chain complex identity (dd = 0), and error handling.
References
- Edelsbrunner & Harer, Computational Topology: An Introduction
- Hatcher, Algebraic Topology, Chapter 2 (simplicial complexes and chain complexes)
- Chen & Lipman (2023), "Riemannian Flow Matching on General Geometries"
- Papillon et al. (2023), "Architectures of Topological Deep Learning"
License
MIT OR Apache-2.0