Metadata-Version: 2.4
Name: dyng
Version: 0.1.0
Summary: dynG: dynamic graph and hypergraph algorithms that update their results under batches of changes
Keywords: dynamic graph,batch update,shortest paths,cycle counting,GPU,OpenMP,graph algorithms
Author-Email: S M Shovan <sm.shovan@gmail.com>
License-Expression: Apache-2.0 AND BSD-3-Clause AND MIT AND GPL-3.0-or-later WITH GCC-exception-3.1
License-File: LICENSE
License-File: LICENSES/Apache-2.0.txt
License-File: NOTICE
License-File: THIRD_PARTY_LICENSES.txt
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Typing :: Typed
Project-URL: Homepage, https://github.com/dyng-dev/dyng
Project-URL: Repository, https://github.com/dyng-dev/dyng
Project-URL: Issues, https://github.com/dyng-dev/dyng/issues
Project-URL: Changelog, https://github.com/dyng-dev/dyng/blob/main/CHANGELOG.md
Requires-Python: >=3.12
Requires-Dist: numpy>=1.26
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: hypothesis>=6.100; extra == "test"
Provides-Extra: torch
Requires-Dist: torch; extra == "torch"
Provides-Extra: pandas
Requires-Dist: pandas; extra == "pandas"
Description-Content-Type: text/markdown

# 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 shortest paths) and TruCy / DynTruCy (cycle counting), with more algorithms
(multi-objective shortest paths, hypergraph motifs, label propagation) to follow.

<!-- snippet: pypi-readme -->
```python
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)
```

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

```console
$ 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
```

This wheel contains the sequential and OpenMP backends (`dyng.Resources("openmp")`); the CUDA
backends follow as plugin wheels in the 0.1.x releases. 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`.
