scanwidth
scanwidth is a Python package for computing edge-scanwidth and node-scanwidth
of directed acyclic graphs (DAGs). It provides exact and heuristic algorithms,
plus reduction pipelines that make practical computation on larger instances
more tractable.
Key Features
- Tree-extension and Extension classess: classes that support (tree-)extensions of DAGs, provide computations for scanwidth-bags and converting to canonical tree-extenions
- Exact and heuristic solvers: XP, brute-force, partition-based exact methods (edge), ILP backend selection (node), and multiple heuristics for edge- and node-scanwidth.
- Reduction framework: configurable
ReducerConfig/Reducerpipelines for edge and node scanwidth, including optional parallel s-block solving.
Installation
Install the base package:
pip install scanwidth
Install optional ILP dependencies:
# SciPy backend for node_scanwidth(..., algorithm="ilp", backend="scipy")
pip install scanwidth[scipy]
# Gurobi backend for node_scanwidth(..., algorithm="ilp", backend="gurobi")
pip install scanwidth[gurobi]
# Both ILP backends
pip install scanwidth[ilp]
gurobipy requires a working Gurobi installation and a valid Gurobi license
(commercial or academic, depending on your setup).
Version requirements for optional ILP backends:
scipy>=1.9.0gurobipy>=10.0.0
Documentation
For installation instructions, quickstart examples, and full API reference, see the scanwidth docs.
Citation
If you use scanwidth in your research, please cite the corresponding paper:
Niels Holtgrefe, Leo van Iersel, and Mark Jones. Exact and heuristic computation of the scanwidth of directed acyclic graphs. Journal of Computer and System Sciences, 160:103802, 2026. doi: 10.1016/j.jcss.2026.103802
If your work builds specifically on the node-scanwidth algorithms, please also cite the following paper describing them:
Niels Holtgrefe and Jannik Schestag. Tractable Optimization of Budgeted Phylogenetic Diversity on Networks Utilizing Node-Scanwidth. arXiv:2605.23319, 2026.
To view the experimental materials of the first paper, go to the folder experiments.
Metadata
Release files for scanwidth 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| scanwidth-0.2.6.tar.gz | 43.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scanwidth-0.2.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.4 kB
Release files / scanwidth-0.2.6.tar.gz
| Download URL | scanwidth-0.2.6.tar.gz |
|---|---|
| Size | 43.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca6802d38564f48b8be33854052da65c174d84e794d45ab49a6050c0fad418dc
|
|
BLAKE2b-256 checksum How to use checksums |
7a12b23dbc6eb65ddef437064b0fce312ce6083e232af2074c5779d65133a6a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 25, 2026.
Transparency logRelease files / scanwidth-0.2.6-py3-none-any.whl
| Download URL | scanwidth-0.2.6-py3-none-any.whl |
|---|---|
| Size | 49.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cb35ef5128bc0ee5b7e89e822a8c3b0ad942fd4e00df960ceecf9d7bc594af90
|
|
BLAKE2b-256 checksum How to use checksums |
093ad5cc2064db15cfd3dcc954260fd5c48662f5059b616f35e1ef02bd285970
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 25, 2026.
Transparency logSecurity for scanwidth 0.2.6
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for scanwidth-0.2.6.tar.gz
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 May 25, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.