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
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "adaptive-triangulation"
version = "0.2.1"
version = "0.3.0"
edition = "2021"
description = "Fast N-dimensional Delaunay triangulation with incremental point insertion (Bowyer-Watson)"
license = "BSD-3-Clause"
Expand Down
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
[![License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](LICENSE)

Fast N-dimensional Delaunay triangulation in Rust with Python bindings (PyO3).
Drop-in replacement for [adaptive](https://github.com/python-adaptive/adaptive)'s `Triangulation` class — **30-300× faster** standalone, **~3.3×** end-to-end in `LearnerND` (where adaptive's own Python code dominates). Used automatically by adaptive ≥ 1.5 when installed.
Drop-in replacement for [adaptive](https://github.com/python-adaptive/adaptive)'s `Triangulation` class — **30-300× faster** standalone, **~3.3×** end-to-end in `LearnerND` (where adaptive's own Python code dominates).
Used automatically by adaptive ≥ 1.5 when installed.

## Performance

Expand All @@ -33,11 +34,8 @@ The end-to-end ratio is smaller than the standalone one because adaptive's own P

### Batched LearnerND APIs (not yet wired into adaptive)

`simplices_containing` and `default_loss` move two of the remaining `LearnerND`
Python hot loops into Rust. Wired in the way a future adaptive release would use
them ([`examples/learnernd_batched_apis.py`](examples/learnernd_batched_apis.py)),
they add **1.17×** (2D, 3000 pts) to **1.40×** (3D, 1500 pts) on top of the
table above, while sampling identical points.
`simplices_containing` and `default_loss` move two of the remaining `LearnerND` Python hot loops into Rust.
Wired in the way a future adaptive release would use them ([`examples/learnernd_batched_apis.py`](examples/learnernd_batched_apis.py)), they add **1.17×** (2D, 3000 pts) to **1.40×** (3D, 1500 pts) on top of the table above, while sampling identical points.

## Installation

Expand Down Expand Up @@ -73,9 +71,7 @@ Since adaptive 1.5.0 this package is detected and used automatically — no code
pip install "adaptive[rust]"
```

Per learner, the backend can be selected explicitly with
`LearnerND(..., triangulation_backend="auto" | "python" | "rust")`, or globally
with the `ADAPTIVE_TRIANGULATION_BACKEND` environment variable.
Per learner, the backend can be selected explicitly with `LearnerND(..., triangulation_backend="auto" | "python" | "rust")`, or globally with the `ADAPTIVE_TRIANGULATION_BACKEND` environment variable.

For adaptive < 1.5.0, monkey-patch the module instead:

Expand Down
Loading