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
//! # holomap — deterministic UMAP
//!
//! *The bulk, on the boundary.* The holographic principle says the
//! information of an N-dimensional volume can be encoded on its
//! (N−1)-dimensional surface. `holomap` does that for your data:
//! UMAP-class dimensionality reduction with one non-negotiable contract —
//!
//! **Same input + same params + same seed → bit-identical embedding**
//! (on the same platform/toolchain; cross-platform runs are structurally
//! identical, with floats differing at ULP level).
//!
//! There is no unseeded constructor. By design, none will ever exist.
//!
//! ## Validation
//!
//! Every stage is parity-verified against the references: exact kNN + fuzzy
//! simplicial set vs umap-learn 0.5.12 fixtures, spectral initialization
//! (dense + Lanczos eigensolvers) vs scipy, and the end-to-end embedding vs
//! umap-learn's trustworthiness(k=15) on blobs and swiss roll (within 0.05;
//! swiss roll edges the reference). The determinism gate byte-compares
//! `fit_transform` double-runs in CI.
//!
//! ## Quick start
//!
//! ```
//! use holomap::Holomap;
//!
//! // 40 points on a noisy 4-d lattice, row-major
//! let data: Vec<f32> = (0..160).map(|i| (i % 7) as f32 + 0.01 * i as f32).collect();
//! let embedding = Holomap::builder(42) // seed is REQUIRED — by design
//! .n_neighbors(5)
//! .fit_transform(&data, 4)
//! .unwrap();
//! assert_eq!(embedding.len(), 40 * 2); // n_components defaults to 2
//! ```
pub use ;
pub use Metric;
pub use Init;
/// The contract, stated as a constant since commit one. The real enforcement
/// is the end-to-end double-run test on [`Holomap::fit_transform`] plus the
/// CI determinism job (full test suite twice).
pub const DETERMINISM_CONTRACT: &str =
"same input + same params + same seed => bit-identical embedding";