Skip to main content

PyPI version PyPI downloads Coverage Build

untangle-rs

Library that minimises edge crossings in weighted multipartite graphs, with support for respecting node hierarchy. It uses a simple metropolis-hastings algorithm that iteratitely swaps neighboring nodes in order to minimize the number of crossings. It is unlikely to find a global minimum but does converge to optimal solutions.

Basic example Basic example

Basic layouts

You can minimize the crossings in arbitrary multipartite graphs, as long as you provide the parts of the graph:

from untanglers import LayoutOptimizerInt

nodes = [
  [0,1,2],
  [3,4,5],
  [6,7,8],
]

edges = [
  # node_a, node_b, edge_weight
  [(0, 4, 1), (1, 3, 5)],
  [(4, 8, 2), (5, 6, 1)]
]

optimizer = LayoutOptimizerInt(nodes, edges)
edge_crossings = optimizer.count_crossings()
new_crossings = optimizer.optimize(
  start_temp = 1.0,
  end_temp = 0.1,
  steps = 3,
  max_iterations = 20,
  passes = 5,
)

Complicated example More complicated graph

Hierarchical layouts

In case certain nodes need to remain grouped together, the optimizer also supports hierarchy. This is useful for visualizing e.g. data lineage where columns in a table should remain together.

from untanglers import HierarchyOptimizerInt

nodes = ...
edges = ...

hierarchy = [
  # 2 levels, note that the coarser level is aligned with the finer level
  [[4,5,6,5], [9, 11]],
  [[7, 20, 13], [27, 13]],
  [[8, 9, 6, 7], [17, 13]],
]

optimizer = HierarchyOptimizerInt(nodes, edges, hierarchy)
new_crossings = optimizer.optimize(...)

Hierarchical example Graph with 2 levels of node hierarchy

Metadata

Release files for untangle-rs 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for untangle-rs 0.2.2
File Size Uploaded Provenance
untangle_rs-0.2.2.tar.gz 20.2 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for untangle-rs 0.2.2
File
untangle_rs-0.2.2-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
untangle_rs-0.2.2-cp39-abi3-win32.whl CPython 3.9 abi3 Windows x86-32 Details
untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details
untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_i686.whl CPython 3.9 abi3 Linux musl 1.2+ x86-32 Details
untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_armv7l.whl CPython 3.9 abi3 Linux musl 1.2+ ARMv7l Details
untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details
untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl CPython 3.9 abi3 Linux glibc 2.17+ IBM System/390x Details
untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl CPython 3.9 abi3 Linux glibc 2.17+ PowerPC 64-le Details
untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-32 Details
untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.9 abi3 Linux glibc 2.17+ ARMv7l Details
untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
untangle_rs-0.2.2-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
untangle_rs-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 6.0 MB

Release files / untangle_rs-0.2.2.tar.gz

Download URL untangle_rs-0.2.2.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
da49f3fc345ea61c1f86f5f2f2e62a486d74e166025d05d004d9fbf18cb97376
BLAKE2b-256 checksum
How to use checksums
996a80d32d9327e15eab7638b11c6609feb3dbc409ac7532054cef850bbeffb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-win_amd64.whl

Download URL untangle_rs-0.2.2-cp39-abi3-win_amd64.whl
Size 245.7 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0d7b4a0d149771d20e08be5341e5a44f196fd4f32b6f10ea4d0b057e28653de4
BLAKE2b-256 checksum
How to use checksums
8c7cf67beb60df2f7e61f0993a7e810e797882a475add7677be75cba7bb896b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-win32.whl

Download URL untangle_rs-0.2.2-cp39-abi3-win32.whl
Size 229.1 kB
Tags CPython 3.9 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
2937fc32fb93f266d3c5ba3c477ffd486cbd5adf207f60c2661dd4abab69cd24
BLAKE2b-256 checksum
How to use checksums
6c9a0707ec6d83f381972437f4be26bc6f4e7e50f8a0913a82bc16942f166fdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_x86_64.whl
Size 556.3 kB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
d1c6269504f7c1bdd8ab535829a97a92d1d2befd39beec8dc30bc5cee733b460
BLAKE2b-256 checksum
How to use checksums
9f377cd557872cd79fbf9a2cfd27b5eb3f547f10fd8be7a0410e79b25841b17f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_i686.whl

Download URL untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_i686.whl
Size 586.6 kB
Tags CPython 3.9 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
31f00c23c0676f79e079a4b91016453e77926ec554f89badeca7c5f987def34f
BLAKE2b-256 checksum
How to use checksums
3b0a893fa71954f7dbaf2cecc2ecc378fb4d1897f671cdc980b30bd9af877609
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_armv7l.whl

Download URL untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_armv7l.whl
Size 646.5 kB
Tags CPython 3.9 Linux musl 1.2+ ARMv7l abi3
SHA-256 checksum
How to use checksums
40d3e3e637ca00940dd5b111d9f3e8e72f4d84d766283c39fb80179c2ccf2f04
BLAKE2b-256 checksum
How to use checksums
8f6749fa0319e4d65718808b22d2f082f4c55f28e1ec4991ccc9d193ab55086e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL untangle_rs-0.2.2-cp39-abi3-musllinux_1_2_aarch64.whl
Size 556.4 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
cfab4151956a1dffb2c321f2520ef141ea42754c37205bb89733db1c20e4f708
BLAKE2b-256 checksum
How to use checksums
e493afbbd20ab4529813d7fe85aebe33c9c8a13e89e0b738cc33d319e4051512
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 391.1 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
a7a06f411c9691281cd7f12459786124599105d48276b13d8f8a9720a9cab7d8
BLAKE2b-256 checksum
How to use checksums
4d71c7db879e2ad40ed3627baaf5e65afe8b65e37015bcb604ff911c5721c37f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl

Download URL untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Size 421.3 kB
Tags CPython 3.9 Linux glibc 2.17+ IBM System/390x abi3
SHA-256 checksum
How to use checksums
06294daaabe891bea01414138a53756ec90cca5a99fec1aef4511ed49398ca6d
BLAKE2b-256 checksum
How to use checksums
b3cbafde03ba5fb6a106610fee7bc1902f9da38c5825bb333df9640255b2f932
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Download URL untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Size 504.6 kB
Tags CPython 3.9 Linux glibc 2.17+ PowerPC 64-le abi3
SHA-256 checksum
How to use checksums
b1c5b166a3f885e25ecafc22bb91d83963674188f395ac7d7af854f5b02291fb
BLAKE2b-256 checksum
How to use checksums
55c3f0e4812f472ecb6d54266bf3b6a6d47b5c731d6c03173cc28908d966bb23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Size 416.9 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-32 abi3
SHA-256 checksum
How to use checksums
6d8d00bdef710bf263bc2421ecf0cd4011b853b4ff52f081a018e795904d12d9
BLAKE2b-256 checksum
How to use checksums
37942e8ee5b930549648bd496662c194eab089cf7daae38328aa33b5edb35701
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 382.5 kB
Tags CPython 3.9 Linux glibc 2.17+ ARMv7l abi3
SHA-256 checksum
How to use checksums
2c8f5f20bc941317d2729bae7863c732b3f707737e2d5d489827568079260912
BLAKE2b-256 checksum
How to use checksums
9949fb92c0a76cc9c999ef5d34c73f07d0f7296ddf317c842b4051c177e57b63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL untangle_rs-0.2.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 376.0 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
2c33d62b3a003a9a49a3235998c47276f605da89f48e39c65bf5b8eab6930ba2
BLAKE2b-256 checksum
How to use checksums
115ff0b145a888aacf804f3106a0b8ef386cce9bc74ca15345ee01b2e865ae73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-macosx_11_0_arm64.whl

Download URL untangle_rs-0.2.2-cp39-abi3-macosx_11_0_arm64.whl
Size 339.8 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b2fc01a170ffb8c6f4071362aff69c00279fb5569bf655c24aae20e8ac1fca7a
BLAKE2b-256 checksum
How to use checksums
0087acf465fd9e2021c7509e157eaf92cb4db9911e1e27d77804a69e7e3185fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Release files / untangle_rs-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl

Download URL untangle_rs-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl
Size 350.9 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c8a9a51f08b0782c15acc1f20d57b2f2bd19e97efec70c99d734871b24356b89
BLAKE2b-256 checksum
How to use checksums
153eac4e1cf087beaa26a1d6f283a5964d57ea60eabe3cf0c06c46815559a1e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Security for untangle-rs 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page