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

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

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

torch_delaunay-1.1.0-cp312-cp312-win_amd64.whl (140.9 kB view details)

Uploaded CPython 3.12 Windows x86-64

torch_delaunay-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

torch_delaunay-1.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.1 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

torch_delaunay-1.1.0-cp312-cp312-macosx_11_0_arm64.whl (153.1 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

torch_delaunay-1.1.0-cp311-cp311-win_amd64.whl (140.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

torch_delaunay-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

torch_delaunay-1.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

torch_delaunay-1.1.0-cp311-cp311-macosx_11_0_arm64.whl (154.3 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

torch_delaunay-1.1.0-cp310-cp310-win_amd64.whl (139.7 kB view details)

Uploaded CPython 3.10 Windows x86-64

torch_delaunay-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

torch_delaunay-1.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

torch_delaunay-1.1.0-cp310-cp310-macosx_11_0_arm64.whl (152.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

torch_delaunay-1.1.0-cp39-cp39-win_amd64.whl (139.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

torch_delaunay-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

torch_delaunay-1.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

torch_delaunay-1.1.0-cp39-cp39-macosx_11_0_arm64.whl (152.9 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 473e789f567506379db7fe40a0209754fa45eb938cc41f39985c8824632b922c
MD5 f05385efbc1fad82031f8ac96efbf0f0
BLAKE2b-256 6175410404504a8e59e4d3c755f824f3f52514301ea51519719b75c743075a74

See more details on using hashes here.

File details

Details for the file torch_delaunay-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 13948817eb68a779fdb7959835d13159795f103e5c5d83c5560e7da955e4fb5f
MD5 06c47d2f62d20e07e0c149dc3e926246
BLAKE2b-256 7b16fdaa037eb2466147df3e65c36a45be6af35648b405aa737e751a9f47bd59

See more details on using hashes here.

File details

Details for the file torch_delaunay-1.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6a68511dbd6cabb8dc44d59103963600cb6e77f8884f547dfd08ebef0127da11
MD5 68b4a61e5f7609d7a6752e0400de8305
BLAKE2b-256 97df7ee811b7d859bb3be6eb28301094c455b8af94e80d3d77d562cb2b288597

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 701f8ef4fe451e92bd67f5b512cb88477859e3f8f02f50eb43536b701217ba35
MD5 37ca408772f45624b69d6a6236d22371
BLAKE2b-256 0897bf7baaca4deeb5269f9a80771406261fceb59933af62bd0d04b682775bfd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ebf27817cb5ebe09b85ef8c46e953f52bfb63e023cb8009aa32bc133eb93b053
MD5 4401890a226379af46a3863f41a8fd49
BLAKE2b-256 4a444d24fbf068f4461d93fbe174a954cdffe2a320b419a31c8b85bdb32b00d3

See more details on using hashes here.

File details

Details for the file torch_delaunay-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b04cfa0c0a58fc385d15f01a61daec51df6e06d3b4253232df15a6e454c03db2
MD5 989d907b740b1dad8e45cdf4fc0840d2
BLAKE2b-256 7ac8c26bb192f985d73938a310b9c499989fd452d179e048a280d4089fa31395

See more details on using hashes here.

File details

Details for the file torch_delaunay-1.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b32406169e6c507312b07cd4763d4b2eda6594f97d39b9d1abfe257466ca35f5
MD5 e65fdea18f4399d9032bb1d823c0c62a
BLAKE2b-256 1bdba8a8316aaa54bf3aedcb5abf11696b9ea27197f82c5740d058821737d439

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4b0496d4e808706233e755880eba7acb2c69f5f6d06e652fedd17e7b264fec2d
MD5 0e5dd5c8a571881b0982d7ca4459d355
BLAKE2b-256 582007e7abb64149e5060c0b16e2b5c8088d51e0cea7ade2763903d311a55391

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9d333b4fa3c13292760ce36f1b938511f2504f23c7b06a2d6e50e8348745cb51
MD5 d7745b8f61625ba4b3b9ee724d54a3dd
BLAKE2b-256 688b0188d1494d8c55d04ea49ce334d205bce819b54eb1a2a87dd9a51f66ac64

See more details on using hashes here.

File details

Details for the file torch_delaunay-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8251e969ede264ca8e0b4483e22a63f4fa57f9b203df74f022a2669ca32ef32c
MD5 23a7cc0dbabc5112a92880948b8fa4a8
BLAKE2b-256 008ba3c82c3094a6094a6434ae32c34a0a77c8077401995ca6c9e16032d9e1c8

See more details on using hashes here.

File details

Details for the file torch_delaunay-1.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 faca2d50adf22929b74ad7f2607e2cad1c7d22e738875fd46e220dd62a07e66b
MD5 9329c21a000f07eeeb06b1979a8214c7
BLAKE2b-256 3c029efab3f4944222886a542fad1ed4b8c1f60aa20ade8aa9490b848fdd9791

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d235e1c2a605533247396227cc267868bbfb4a8a2c0bcc04806ee7744580c95b
MD5 693194b025c621f459ac8a2ccd2d28ec
BLAKE2b-256 1d69eb529f5023db8bf0141e1de4e98c26ce0325f4db821d2cc98b6e531f2408

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 67bbe893ceb8b60684d26e0166a1d1a2f32117f78fa10a30f65060c821a0dc5b
MD5 3366fe6a1d4def8ad99e6982885cf034
BLAKE2b-256 2ace04a66ced140b8293a2a11110032573e022c635a716b0dd028124587233c3

See more details on using hashes here.

File details

Details for the file torch_delaunay-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e48976d8dbfc97fd45fcee650fb29542b983bb10efbbfab87a412a8f7f791022
MD5 52e05f0558e201e0dfa6d68082a35656
BLAKE2b-256 b3085cfde0463f142672a0c02844294765b1787fcb187aa6ccd387cb3d53ddd7

See more details on using hashes here.

File details

Details for the file torch_delaunay-1.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2f291fd59f283d874725a8bac2408f4c56ef1f978af5b79c0042b55c1bcb510e
MD5 87aa7c0bd8d108ea7a632f079cb4e5db
BLAKE2b-256 de6eca5f08f796b2758089ff705fa9fad37c8ff8e3df6f327403082579061000

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for torch_delaunay-1.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3328580677e8bac8c08d590e459412206fea35e7c02fbef47fdcdf292ee98b02
MD5 02f9fcb816c1af2eb46a6fe55f7fb97f
BLAKE2b-256 16bbb0e15f5f787d931fdc19004fe1c2c2ea12dafa6d684c2878a8dfc1c71358

See more details on using hashes here.

Supported by

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