You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: refresh README benchmarks and document the robustness contract (#9)
* docs: refresh benchmark numbers after the performance and robustness work
All numbers re-measured on one machine with the scripts in examples/
against the current main (post data-structure rework, cavity repair,
and PyO3 fast paths):
- standalone incremental insertion: 40-291x vs the Python reference
(was 17-42x before the rework; the Rust side got 2-8x faster)
- LearnerND end-to-end: 3.7x vs Python LearnerND and 7x vs Learner2D
at 5K points, with a note explaining why the end-to-end ratio is
smaller (adaptive's own Python loss machinery dominates once the
triangulation is fast)
- note that numbers are machine-dependent and how they were produced
Also: mention the now-supported neighbor-aware losses and the two
neighbor-query methods in the API list, and add a short Robustness
section describing the validate/repair/reject contract on degenerate
input, pointing at src/tolerances.rs.
* docs: one sentence per line in README prose
Semantic line breaks instead of hard-wrapped paragraphs, so future
diffs touch exactly the sentences that changed.
Fast N-dimensional Delaunay triangulation in Rust with Python bindings (PyO3).
9
-
Drop-in replacement for [adaptive](https://github.com/python-adaptive/adaptive)'s `Triangulation` class — **5-99× faster**.
9
+
Drop-in replacement for [adaptive](https://github.com/python-adaptive/adaptive)'s `Triangulation` class — **30-300× faster** standalone, **3.7×** end-to-end in `LearnerND` (where adaptive's own Python code dominates).
10
10
11
11
## Performance
12
12
13
+
Measured with the scripts in [`examples/`](examples/), best of 3 for the standalone runs.
14
+
Absolute times are machine-dependent; the ratios are representative.
@@ -112,6 +121,13 @@ from adaptive_triangulation import (
112
121
-[`examples/adaptive_learnernd.py`](examples/adaptive_learnernd.py) — LearnerND integration with timing
113
122
-[`examples/benchmark_vs_python.py`](examples/benchmark_vs_python.py) — Standalone benchmarks across dimensions
114
123
124
+
## Robustness on degenerate input
125
+
126
+
Point sets that mix widely separated coordinate scales force sliver simplices that no floating-point predicate can handle reliably.
127
+
Unlike the Python reference (which can corrupt its state on such input), this implementation validates every insertion before mutating: a cavity that cannot be re-triangulated is first repaired with exact predicates (Shewchuk's, via the [`robust`](https://crates.io/crates/robust) crate), and if even that fails the insertion raises with the triangulation untouched, so callers can skip the point and continue.
128
+
Well-conditioned inputs behave identically to the reference.
129
+
The full policy is documented in [`src/tolerances.rs`](src/tolerances.rs).
0 commit comments