Skip to main content

dynG

dynG keeps the results of graph algorithms up to date while the graph changes in batches of edge insertions and deletions, without recomputing from scratch. It unifies the research codes of DynaMOSP (dynamic single- and multi-objective shortest paths) and TruCy / DynTruCy (cycle counting): dyng.sssp, dyng.mosp and dyng.cycle_count are stable, with more algorithms (hypergraph motifs, label propagation) to follow; dyng.dynamic_bfs and dyng.triangle_delta are small tutorial algorithms.

import dyng

g = dyng.Graph.from_edges([0, 0, 1, 2], [1, 2, 2, 3], [4, 1, 1, 5])   # src, dst, weights
tree = dyng.sssp.compute(g, source=0)                                # shortest-path tree
batch = dyng.EdgeBatch(insert=([1], [3], [1]), delete=([0], [2]))
stats = dyng.sssp.update(g, batch, tree)                             # incremental update
print(tree.distances.to_numpy(), stats.invalidated)

hist = dyng.cycle_count.compute(g, max_length=4)                     # simple cycles by length
print(hist.counts.tolist(), hist.total)

w2 = [[4, 1], [1, 5], [1, 1], [5, 2]]                                # two objectives per edge
g2 = dyng.Graph.from_edges([0, 0, 1, 2], [1, 2, 2, 3], w2)
paths = dyng.mosp.compute(g2, source=0)                              # multi-objective (MOSP)
dyng.mosp.update(g2, dyng.EdgeBatch(delete=([0], [2])), paths)
print(paths.path_costs.to_numpy().tolist())                          # the K costs per vertex

The package also installs the dyng command line, which reads and writes the formats of the original tools:

$ dyng cycle_count compute --graph DD_A.txt --max-length 6       # histogram CSV
$ dyng sssp compute --graph roadNet-CA_ --out init                # MOSP's distance and tree files
$ dyng sssp update --graph roadNet-CA_ --changes batch --init init --out updated
$ dyng mosp update --graph roadNet-CA_ --changes batch --init init --preferences 4,1,4 --out out

This wheel contains the sequential and OpenMP backends (dyng.Resources("openmp")). The CUDA backend comes as a plugin wheel of the same version, from 0.2: pip install "dyng[cu13]" (an NVIDIA driver of CUDA 13) or pip install "dyng[cu12]" (CUDA 12); dyng.Resources.cuda() then runs every algorithm on the GPU, and dyng.show_config() reports which module is used. The C++ library, the documentation and the parity reports with the original codes are at https://github.com/dyng-dev/dyng.

Cite dynG and the papers behind the algorithms you use: dyng.citation("sssp").

License: dynG is Apache-2.0. The wheel also contains nanobind (BSD-3-Clause), robin-map (MIT) and the GCC runtime (GPL-3.0-or-later WITH GCC-exception-3.1), which the distributions' licence expression names; their licences are in THIRD_PARTY_LICENSES.txt.

Metadata

Release files for dyng 0.2.0

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

Source distribution (sdist)

Source distribution for dyng 0.2.0
File Size Uploaded
dyng-0.2.0.tar.gz 1.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for dyng 0.2.0
File Interpreter ABI Platform
dyng-0.2.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details

Total release size: 2.5 MB

Release files / dyng-0.2.0.tar.gz

Download URL dyng-0.2.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
0ef5da61ec9c49068b243c06fa628967b71afa622ed0ad262ba877c859452c2d
BLAKE2b-256 checksum
How to use checksums
ebf8b557290b30e4d2a7b622260d7c63c39b4cc006705c9951355f63b8b40746
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / dyng-0.2.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL dyng-0.2.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
89502156e986b5e79be7a0bc5b85875237c1796b75daa44e6e51a8526fd583ec
BLAKE2b-256 checksum
How to use checksums
9f0623521ddacde5504002836b2c52bdd61c12aab782575d0c9ef814737384b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

0.0.1

2 release files

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