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.2.0-cp312-cp312-win_amd64.whl (140.9 kB view details)

Uploaded CPython 3.12Windows x86-64

torch_delaunay-1.2.0-cp312-cp312-manylinux_2_28_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

torch_delaunay-1.2.0-cp312-cp312-manylinux_2_28_aarch64.whl (8.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

torch_delaunay-1.2.0-cp312-cp312-macosx_11_0_arm64.whl (152.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

torch_delaunay-1.2.0-cp311-cp311-win_amd64.whl (140.4 kB view details)

Uploaded CPython 3.11Windows x86-64

torch_delaunay-1.2.0-cp311-cp311-manylinux_2_28_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

torch_delaunay-1.2.0-cp311-cp311-manylinux_2_28_aarch64.whl (8.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

torch_delaunay-1.2.0-cp311-cp311-macosx_11_0_arm64.whl (154.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

torch_delaunay-1.2.0-cp310-cp310-win_amd64.whl (139.6 kB view details)

Uploaded CPython 3.10Windows x86-64

torch_delaunay-1.2.0-cp310-cp310-manylinux_2_28_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

torch_delaunay-1.2.0-cp310-cp310-manylinux_2_28_aarch64.whl (8.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

torch_delaunay-1.2.0-cp310-cp310-macosx_11_0_arm64.whl (152.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

torch_delaunay-1.2.0-cp39-cp39-win_amd64.whl (140.2 kB view details)

Uploaded CPython 3.9Windows x86-64

torch_delaunay-1.2.0-cp39-cp39-manylinux_2_28_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

torch_delaunay-1.2.0-cp39-cp39-manylinux_2_28_aarch64.whl (8.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

torch_delaunay-1.2.0-cp39-cp39-macosx_11_0_arm64.whl (152.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d89fc9601c18d4301aa1a5eeb05b0a64c99d92158265e536b637df70422f2daa
MD5 27149429e8caaeaea1d516ddcc227a32
BLAKE2b-256 3579958763134017561ed11e929e4e94a7c41b9a3d0120e04176585cb616962a

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 35edcae9b09028261d0d0020e249d577705e06794c6db8efe77991ccc5b0749f
MD5 4dfba8e26754b37110c98548078eeed8
BLAKE2b-256 765c1a9b74c55e0541e60f38e0853148e2f7ab5758b74bab29336d308a85949c

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0a3fec369b6542cd6c3cb30a6b9a17c41b0f14f08f9bbff851b6b74d472fc028
MD5 661fcdf8b0b241f999b47755306065ca
BLAKE2b-256 58ed17569d5c339170f063c95ba0c4e343b0a143bfba3bc7c2f6cf23b0d17115

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9ef12463ed4e505ba9b8cefbec0d4c4497c272c43b46fcd9ffb8136ea3e415a8
MD5 f177d911f586dc56299de9ac5bb10bdf
BLAKE2b-256 bcbe51f4441267c5d4419a5b95f06c7833689c94113302c2d15ad42bc76552c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2bccab235cd84f047d1ebd61187feda72fc356bada7459c0631d31f599ce0911
MD5 2c962e667ca6b26e1b3730f84aac8ec8
BLAKE2b-256 d875cfb066a4a193954d2a532cac3b14e4e4514248aa7356f1fecb6b906bebae

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3f9d9f7d8f3939e97f57604374527a746b28887966505591195ece0b43cae463
MD5 5df3f4b1a95678714e8ebb5ac55eaf49
BLAKE2b-256 7fd2f4b3a2d8aca5bae4537ce1b45b5ff65375cc8bda0acec5a6fcc26dec5c56

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f169519bbb2a46362d9b2b32a1d85c82f7fdcd7c5b4463e3cbd666638a4594a8
MD5 853f6be1396f3978210a31c109fdcfaa
BLAKE2b-256 520a83f85b62f70097356bb746d39cdd750e3f16ccb66a11d88af74c200a987f

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fb934720a0eca6a46153fd31f4d7475680c0efe3f43c0d2cc893030623062457
MD5 141d809e6a8df670f5cab334f0639e36
BLAKE2b-256 d8251982e251545da249e4590ef8cfec089d0b82382901d3894befee01651f6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 215c9adb794aba82eb871c6f7009373825079cc01a326a39cb1b2c9b7c26a301
MD5 6f88ed2f282b822f8a331cee401120f7
BLAKE2b-256 94b1b10eb68ffa95678100f435fa9a7d8c4a224ff12adb2ab2c956d44c44f9e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 875b2dcc1a47b8a868df8264ebb2e1d5d8c957b73796daf963ab697376d4bec9
MD5 8d6b262ec8ac58d0cf04fdff91bfaea7
BLAKE2b-256 58ba1a66454163d99801cc9a616d52784cac4d280398c9cc074ee8822f1f3f24

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 339fe2d7b04ba1f91fea8a994e318825a84f4803aef27b9ad345bc24be768293
MD5 074272f4ee274d7b3015b82c8d83e674
BLAKE2b-256 4c1a0c18575000f68da8b7a467fef7e46af4ad2624ef87f9bfb7a72dea253a02

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cd9f72e91ec7f6e6ead30c979946eff3e04edcf864769484c3d46e6ad0555989
MD5 e1964250553f674b0dd4114f1f427853
BLAKE2b-256 f6e2f281cdee8be229b08006d77565f841c0f3fdff83a7e2b8854452ba0e98e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 352ba03813c01aed40097bfdf20113e6131f3617d22c9df8bbfdf480b8c33806
MD5 9a6564cb6449eadc980545fb8e157c57
BLAKE2b-256 ee08556f140fa00b68d73302646af2b61bd88f242b5af71674456687facc9b4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a95c02c1f011bd2ab49e407ed0a81006dd80231c896c4ec8134d234a7ed491b8
MD5 bf4bca98d1ccd80cceeb82c91b916545
BLAKE2b-256 6fa2e9c609eeb74fb96890e7c9f515d26d63f551b5b9b47b059ec96455a9de03

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1b55a5a095ce90c5efce14f17d47f016e48d1e0c0ace14c7e33b07eedb265428
MD5 38515f96d4d1679f72ec911d4841d9bd
BLAKE2b-256 01815016cc3871ebfa424fe45e3ad45c2a6d35f97824354f9398410bc5bf5175

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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.2.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for torch_delaunay-1.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 63c7cd4a9e4f273188d412e66fb38a8769c3cd7d31c9a24247da0b22c90ac773
MD5 69a8cc7f9acf74c2b1a6140fbca51094
BLAKE2b-256 844d4487098fa5657fed22973efdb4f17817037615e6d4c28322bc4da5f3422a

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_delaunay-1.2.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