Package for computing scanwidth of directed acyclic graphs (DAGs)
Project description
scanwidth
Package for computing scanwidth of directed acyclic graphs (DAGs).
Installation
pip install scanwidth
Quick Start
from scanwidth import DAG, Extension, TreeExtension
# Load a DAG from a file
dag = DAG("path/to/graph.el")
# Compute scanwidth using various algorithms
sw, extension = dag.optimal_scanwidth() # Exact algorithm
sw, extension = dag.greedy_heuristic() # Greedy heuristic
sw, extension = dag.cut_splitting_heuristic() # Cut-splitting heuristic
sw, extension = dag.simulated_annealing() # Simulated annealing
# Save the extension
extension.save_file("output.txt")
Algorithms
The package provides several algorithms for computing scanwidth:
optimal_scanwidth()- Exact algorithm using dynamic programminggreedy_heuristic()- Fast greedy heuristiccut_splitting_heuristic()- Cut-splitting heuristicsimulated_annealing()- Simulated annealing metaheuristic
All methods return a tuple (scanwidth_value, extension_object). For specific parameter settings and detailed documentation, refer to the source code.
Citation
If you use this package in your research, please cite:
Paper: Exact and Heuristic Computation of the Scanwidth of Directed Acyclic Graphs by Niels Holtgrefe, Leo van Iersel, and Mark Jones (2024)
Available at: arXiv:2403.12734
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scanwidth-0.1.0.tar.gz.
File metadata
- Download URL: scanwidth-0.1.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abff2559909d6023422f7f9fc3bef4eb4dd3c7546d897392b6fe1852bdc9ad7f
|
|
| MD5 |
0c6e203520bd40b1aca7f660da9f2bda
|
|
| BLAKE2b-256 |
55c9c6030ee6abcbcd4442ab5d53a8e40ec0132c0a68717cfbfce2e37750a71b
|
File details
Details for the file scanwidth-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scanwidth-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f034b4357a9ca7b0bffabb8c8c82e15a05f8315a465c71bb5a7c7087ca82b83a
|
|
| MD5 |
fa34589b3b310584617aefa79a5d97ff
|
|
| BLAKE2b-256 |
96de0f63b553aa861685dfdd778b363e3930608eeb68bf1c442c1922e4dd942e
|