Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ uuid = { version = "1.23.4", features = [ "v4", "serde", "fast-rng" ] }
[dev-dependencies]
approx = "0.5.1"
criterion = { version = "0.8.2", features = [ "html_reports" ] }
markov-chain-monte-carlo = "0.4.0"
pastey = "0.2.3"
proptest = "1.11.0"
serde_json = "1.0.150"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ and [`docs/numerical_robustness_guide.md`](docs/numerical_robustness_guide.md).
| Level | Validates | Primary API |
|---|---|---|
| 1 | Vertex, simplex, and facet element invariants | `vertex.is_valid()` / `simplex.is_valid()` |
| 2 | TDS keys, incidences, and neighbor links | `dt.tds().is_valid()` / `dt.tds().structure_report()` |
| 2 | TDS keys, incidences, and neighbor links | `dt.validate_structure()` / `dt.structure_report()` |
| 3 | Manifold topology, ridge links, and Euler consistency | `dt.as_triangulation().is_valid_topology()` / `dt.as_triangulation().topology_report()` |
| 4 | Faithful embedding | `dt.as_triangulation().is_valid_embedding()` / `dt.as_triangulation().embedding_report()` |
| 5 | Delaunay property via local predicates | `dt.is_valid_delaunay()` / `dt.delaunay_report()` |
Expand Down
57 changes: 54 additions & 3 deletions benches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ predicates fast across 2D-5D.
| `ci_performance_suite.rs` | Public workflow regression contract | Calibrated 2D-5D canaries | ~5-10 min | CI, baselines, `just perf-no-regressions` |
| `circumsphere_containment.rs` | Compare circumsphere predicate methods | 2D-5D fixed, 3D random, edge cases | ~5 min | Predicate tuning, summaries |
| `cold_path_predicates.rs` | Track hot/cold predicate paths | 2D-5D hot queries, near-boundary cases | ~2-5 min | Predicate optimization work |
| `delaunay_repair.rs` | Flip-based Delaunay repair on prepared Levels 1-4 fixtures | 2D-5D repair-convergent fixtures | ~2-5 min | Repair tuning |
| `pachner_stress.rs` | Unified Pachner move API stress | Accepted 4D k=1/k=2/k=3 forward/inverse moves | <1 min | Monte-Carlo move workflow tuning |
| `delaunay_repair.rs` | Flip-based Delaunay repair plus transaction-pressure cases | 2D-5D repair-convergent fixtures | ~2-5 min | Repair tuning |
| `pachner_stress.rs` | Unified Pachner move API stress | Accepted 4D microcases plus 3D/4D Monte Carlo sequences | Manual | Monte-Carlo move workflow tuning |
| `pl_manifold_repair.rs` | Over-shared facet and targeted topology repair | 2D/3D synthetic repair fixtures | <1 min | PL-manifold repair tuning |
| `profiling_suite.rs` | Large-scale construction, memory, query, validation profiling | 2D/3D 10k, 4D 3k, 5D 1k | ~2-3 hr | Manual/monthly |
| `delete_vertex.rs` | Vertex deletion and rollback cost | 2D-5D fixed cases | ~1-5 min | Vertex deletion |
Expand Down Expand Up @@ -42,7 +42,8 @@ predicates fast across 2D-5D.
| Predicate comparison | `cargo bench --profile perf --bench circumsphere_containment -- --noplot` |
| Predicate cold-path work | `cargo bench --profile perf --bench cold_path_predicates -- --noplot` |
| Flip-based Delaunay repair | `cargo bench --profile perf --bench delaunay_repair -- --noplot` |
| Unified Pachner move stress | `cargo bench --profile perf --bench pachner_stress -- --noplot` |
| Flip-repair transaction pressure | `cargo bench --profile perf --bench delaunay_repair -- repair_transaction_pressure --noplot` |
| Unified Pachner move stress | `just pachner-stress` |
| PL-manifold repair path | `cargo bench --profile perf --features bench --bench pl_manifold_repair -- --noplot` |
| Large-scale scaling suite | `cargo bench --profile perf --bench profiling_suite -- --noplot` |
| Vertex deletion mutation baseline | `cargo bench --profile perf --bench delete_vertex -- --noplot` |
Expand Down Expand Up @@ -184,6 +185,56 @@ DELAUNAY_BENCH_EXPORT_METRICS=1 \
Use `just bench-perf-summary` for release summaries; it runs the full perf
profile summary workflow and captures the construction metrics automatically.

## Pachner Stress

```bash
just pachner-stress
just pachner-stress-3d
just pachner-stress-4d
```

`pachner_stress.rs` contains two layers:

- accepted-move microcases for the unified 4D Pachner API facade
- manual Monte Carlo stress cases for 3D and 4D long-run topology stability

The `just` recipes run the Monte Carlo cases at the default issue-scale target:
10,000 vertices in 3D and 1,000 vertices in 4D, with 100,000 attempted random
Pachner moves per Criterion sample and topology validation every 1,000
attempts. Criterion requires at least 10 samples, so a default dimension-specific
recipe measures at least ten 100K-move sequences. These recipes enable
`DELAUNAY_PACHNER_STRESS_REPORT=1`, causing each measured sequence to emit a
`pachner_stress_metric` line with accepted/rejected attempts, proposal
diagnostics, validation time, final simplex count, and RSS memory counters.

The stress cases validate topology plus the Level 4 embedding invariant that
arbitrary Pachner moves are expected to preserve; Level 5 Delaunay validity is
not a postcondition of random topology edits. The move stream runs through the
`markov-chain-monte-carlo` delayed proposal API with a flat target, so
successfully planned Pachner proposals commit with 100% acceptance while invalid
local candidates are recorded as no-proposal self-loops. Validation failures
include recent MCMC trace rows so long chains can be diagnosed by step, outcome,
and topology size.

Useful overrides:

```bash
just pachner-stress-4d 10000 250 1000 10

DELAUNAY_PACHNER_STRESS_REPORT=1 \
DELAUNAY_PACHNER_STRESS_ATTEMPTS=10000 \
DELAUNAY_PACHNER_STRESS_VERTICES_4D=250 \
cargo bench --profile perf --bench pachner_stress -- "monte_carlo/4d" --noplot
```

Supported override families are `DELAUNAY_PACHNER_STRESS_VERTICES`,
`DELAUNAY_PACHNER_STRESS_ATTEMPTS`,
`DELAUNAY_PACHNER_STRESS_VALIDATE_EVERY`,
`DELAUNAY_PACHNER_STRESS_KEY_REFRESH_EVERY`, and
`DELAUNAY_PACHNER_STRESS_SEED`. Append `_3D` or `_4D` for a
dimension-specific value. Use `MONTE_CARLO_SAMPLE_SIZE` to change Criterion's
sample count; the benchmark enforces Criterion's minimum of 10 samples.

## Circumsphere Containment

```bash
Expand Down
Loading
Loading