Tutorials#
A guided path from SpaceCore’s core abstractions to three complete algorithms. Every
page below is a runnable Jupyter notebook in tutorials/ — read it here or open the
notebook and execute it yourself. The foundations build on each other; the worked
algorithms can be read in any order once the foundations are in place.
Foundations#
1 · Backend and Context — Why the backend is an explicit
Context; one routine on NumPy and JAX; check levels.2 · Linear algebra: spaces, operators, conjugate gradients — Spaces with geometry, operators \(A:X\to Y\), and a conjugate-gradient solve.
3 · Functionals and gradient descent — Scalar objectives, metric-aware gradients, and gradient descent.
4 · Tree spaces: structured elements and block operators — Structured unknowns, block operators, and a block solve over a
TreeSpace.
Worked examples#
5 · Weighted Tikhonov: an inverse problem with metric adjoints — An inverse problem solved with metric adjoints and weighted geometry.
6 · Optimal transport with a matrix-free operator — Marginalisation as a matrix-free operator; Sinkhorn powered by its adjoint.
7 · Gradient descent on a manifold with non-Euclidean geometry — A custom non-Euclidean geometry and Riemannian gradient descent.
8 · PDHG for a conic program — A primal–dual solver for a conic program with a Jordan-cone projection.
Performance and internals#
9 · Optimized kernels, dispatch, and operator fusion — Optimized-kernel dispatch (ADR-016), operator fusion (ADR-021), and fold-stack caching (ADR-022): running the fastest bit-exact kernel, multiplying operators together with
fuse(), and reusing a fold’s materialized stack across applies — all opt-in or invisible, none touching the matrix-free contract.