Skip to main content

The Delaunay triangulation for PyTorch

Project description

Torch Delaunay - The Delaunay triangulation library for PyTorch

This is a fast library for computing Delaunay triangulation of 2-dimensional points.

The implementation is based on a sweep-algorithm, introduced by David Sinclair[^1] and later improved by Volodymyr Agafonkin[^2].

Here is an example of triangulation output produced by Torch Delaunay library for a random set of points: example

Installation

The library is distributed as PyPI package, to install the package, execute the following command:

pip install torch_delaunay

You can use the torch_delaunay library for a fast computation of Delaunay triangulation for points defined as PyTorch tensors.

Usage

import torch
from torch_delaunay.functional import shull2d
import matplotlib.pyplot as plt

# Compute Delaunay triangulation for randomly-generated 2-dimensional points.
points = torch.rand((100, 2))
simplices = shull2d(points)

# Plot the result
plt.triplot(points[:, 0], points[:, 1], triangles=simplices)
plt.title("Delaunay Triangulation")

Benchmarks

Benchmarks are collected on Apple M1 Pro chip with 32 GiB of memory.

Prob. Distribution Data Type Samples Time CPU Iterations
Uniform Float64 10000 4.18 ms 4.11 ms 171
Uniform Float64 100000 49.6 ms 48.3 ms 15
Uniform Float64 1000000 600 ms 592 ms 1
Uniform Float32 10000 4.37 ms 4.29 ms 161
Uniform Float32 100000 47.4 ms 46.4 ms 15
Uniform Float32 1000000 573 ms 568 ms 1
Normal Float64 10000 4.60 ms 4.49 ms 156
Normal Float64 100000 48.5 ms 47.4 ms 15
Normal Float64 1000000 568 ms 563 ms 1
Normal Float32 10000 4.42 ms 4.33 ms 165
Normal Float32 100000 46.5 ms 45.4 ms 15
Normal Float32 1000000 550 ms 547 ms 1

License

The Torch Delaunay is distributed under GPLv3 license. See the LICENSE file for full license text.

[^1]: David Sinclair - S-hull: a fast radial sweep-hull routine for Delaunay triangulation.

[^2]: Volodymyr Agafonkin - Delaunator: An incredibly fast and robust JavaScript library for Delaunay triangulation of 2D points.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

torch_delaunay-1.3.0-cp312-cp312-win_amd64.whl (144.2 kB view details)

Uploaded CPython 3.12Windows x86-64

torch_delaunay-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

torch_delaunay-1.3.0-cp312-cp312-manylinux_2_28_aarch64.whl (8.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

torch_delaunay-1.3.0-cp312-cp312-macosx_11_0_arm64.whl (139.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

torch_delaunay-1.3.0-cp311-cp311-win_amd64.whl (143.8 kB view details)

Uploaded CPython 3.11Windows x86-64

torch_delaunay-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

torch_delaunay-1.3.0-cp311-cp311-manylinux_2_28_aarch64.whl (8.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

torch_delaunay-1.3.0-cp311-cp311-macosx_11_0_arm64.whl (141.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

torch_delaunay-1.3.0-cp310-cp310-win_amd64.whl (142.9 kB view details)

Uploaded CPython 3.10Windows x86-64

torch_delaunay-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

torch_delaunay-1.3.0-cp310-cp310-manylinux_2_28_aarch64.whl (8.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

torch_delaunay-1.3.0-cp310-cp310-macosx_11_0_arm64.whl (139.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

torch_delaunay-1.3.0-cp39-cp39-win_amd64.whl (143.4 kB view details)

Uploaded CPython 3.9Windows x86-64

torch_delaunay-1.3.0-cp39-cp39-manylinux_2_28_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

torch_delaunay-1.3.0-cp39-cp39-manylinux_2_28_aarch64.whl (8.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

torch_delaunay-1.3.0-cp39-cp39-macosx_11_0_arm64.whl (139.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file torch_delaunay-1.3.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3a2fb96ce8444f47bfc49d63ff84401eb36476fdcdf7c2c076da400c5e8988a4
MD5 57a7cee139533be5fa632b8d4c3913dd
BLAKE2b-256 143c2825fca33e3ee0baa1714736d01c061ea6b33b352dfa203df3d3b183a35b

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp312-cp312-win_amd64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2a43268cad8f336a016aa5aa4d138247cc37f1f041040413afd0b9f7ac1f579d
MD5 398850f8cdaf966ea16d26fb87ddfeeb
BLAKE2b-256 ab8ee4f0319f3be5a2557ae282a36f9c564891a1f9aaca4290df273c6f5fd63e

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 df287715a5fd500525a2313dbb1b6644d60b244bd6229ad450c30cffcaf5600f
MD5 33248dd57da2f620cf78944f73ccd79e
BLAKE2b-256 8527debc3bc1c9b6fcf3a44cfda25ea0f1dfa2c467e43fec96f1ad14130a90ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp312-cp312-manylinux_2_28_aarch64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d679d0e6d15550336c380d34fc3504b22d14866e2e1badda59ba3e00f3f4c51a
MD5 3f3080781d9692cefd729a54fd623c61
BLAKE2b-256 4108442ee618112e31fe31005164e8b1acb65246f3691595d1ff01a7d3982b3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d10d8288e1fc549b3296e20d41a758de26fdbb4789aead796366410fb6e6ac88
MD5 78533b6b8507d0b62dff9a43098d5a9e
BLAKE2b-256 df6ff51157f4cec09557e212488ea4bb9dc80c4a2c6448162a3ad09d0f6ae342

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp311-cp311-win_amd64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4a39b851890188247d7f0aef9a22f8665ce226b9b894099aca8f17f41188c442
MD5 763101e6db284e03a5d1cc6e7eedd100
BLAKE2b-256 75239e1b69fe49ee5b37badae8305ff7a8917d1fe0917912ffeb6aea5a95ede6

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8204faba943af62294b97d1c1c822a36295f638f717c84a715bfdc7f9e2340c8
MD5 222d3e402e16031b118adb6cef6237e6
BLAKE2b-256 af79c7a6be27543cb35bd7fc482dea916f26c0b884cca96e78caf30b462c05eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp311-cp311-manylinux_2_28_aarch64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 369900da64081e1b6b1ec6907451919ba52500fca918d376e714d849a499e32c
MD5 2565dcb05a3cecb0e738373dbd02d4d7
BLAKE2b-256 c216ad2fa647810d8c01eda4c7788896de2c784ef30b7e8d044bd435a31a0a4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b007ea80a95fa38e706de1c3e77e0c1ea2229ec0a2b0676cd9fe1956a09b7209
MD5 73ee22b7cd73d5afe252c2044f8bf6e6
BLAKE2b-256 747b50af535de668592eb2a4ed59e2896afd781b2b34ba4689d5795e501cc670

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp310-cp310-win_amd64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 44b2334edb05d4d86d373842b60dbe52187c3f87dc81a6cfea7d97fd61c43b27
MD5 a9a900e3af8d39e6a7138a1a98d4874e
BLAKE2b-256 19f65e187ed99920aa07b4ec148edaf8bb6cdc3b08c29e7816f943ab2f138769

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ebaa720a6b481216888d94355200127bf67c786281626b6027688eb5232826db
MD5 695646f7f40deaa5bb6413533b98f60d
BLAKE2b-256 0ca444478a9a9de2a73e121aabd22fa60481c7464abad9e3efe980e403d8d478

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp310-cp310-manylinux_2_28_aarch64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c54782bb135193528cefce2282efab0b4fdc3cddbb91de502554a4e5dc3211ce
MD5 e8ff46ce8f264138b555459a68459e7f
BLAKE2b-256 cc6738ab708731ab1d2efab79d251da7f1884f812a995f0e8e1dade4d48c3e89

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7fb7520868c137c58040ac4cbd1c0beaf8f96b5bab4ad1091e1480630b7ecfe0
MD5 6997c6410f20963b17ebf7d7b1762c75
BLAKE2b-256 e007a1f5147b472d1b08a7ec9393b74943bc618e95ae80dd47dc5dd1d3a2586d

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp39-cp39-win_amd64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 31463ae9729ba8dda8d6074b945e194293d7ba0d4a8f62a6046ab634ab219e39
MD5 fcea6fc49698f101e1d3cb536c8113c8
BLAKE2b-256 18faf4d61968e4d9bd06000f562590c69164ef6db609b9d675c7591d5bc8efbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp39-cp39-manylinux_2_28_x86_64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 073f1b9eae5235024b47e709286532fffd5bb6479cdd8fcb099e7f417d2ae51d
MD5 77e56e12356b31a46a7f6de1b6af1fdc
BLAKE2b-256 5777daa52351cb3f3c97ca3bb3aba4b2577a59faa42b92d6a416da761c04fb2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp39-cp39-manylinux_2_28_aarch64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_delaunay-1.3.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.3.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f1df56718c62558947bb85a494427be8ceed234246936651d07c49c01d327ef1
MD5 e915a1525c1a9c5cd84dc87a767b4f3c
BLAKE2b-256 0e7d9166f51c109ed9c34c40898a851d0e0e37c460c3c44dbdf30f6d27c2f16b

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.3.0-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: python_build_wheel.yaml on ybubnov/torch_delaunay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page