Package for computing the edge- and node-scanwidth of a directed acyclic graph (DAG)
Project description
scanwidth
Python package for computing edge-scanwidth and node-scanwidth of directed acyclic graphs (DAGs).
Installation
Install the base package:
pip install scanwidth
Install optional dependency groups:
# Development and test dependencies
pip install scanwidth[dev]
# Documentation dependencies
pip install scanwidth[docs]
# SciPy backend for node ILP (algorithm="ilp", backend="scipy")
pip install scanwidth[scipy]
# Gurobi backend for node ILP (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
(typically commercial, with academic licenses available separately from Gurobi).
Build docs locally:
sphinx-build -b html docs/source docs/build/html
Quick Start
import networkx as nx
from scanwidth import DAG
from scanwidth.edge_scanwidth import edge_scanwidth
from scanwidth.node_scanwidth import node_scanwidth
graph = nx.read_edgelist(
"path/to/graph.el",
create_using=nx.DiGraph,
nodetype=str,
)
dag = DAG(graph)
esw, ext = edge_scanwidth(dag, algorithm="xp")
nsw, ext = node_scanwidth(dag, algorithm="ilp")
Repository Structure
src/scanwidth/: installable Python package.tests/: repository test suite (not part of the installed package).experiments/: experimental materials (not part of the installed package).
For details on experiments, see experiments/README.md.
Citation
If you use this repository in research, please cite:
Exact and heuristic computation of the scanwidth of directed acyclic graphs. Niels Holtgrefe, Leo van Iersel, and Mark Jones. Journal of Computer and System Sciences, 160:103802, 2026. doi: 10.1016/j.jcss.2026.103802
License
MIT License - see LICENSE.
Project details
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.2.0.tar.gz.
File metadata
- Download URL: scanwidth-0.2.0.tar.gz
- Upload date:
- Size: 37.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8004513d8a4726b83aed9690d48fce0895751bc64d50ed6e7276f4ecb8d403aa
|
|
| MD5 |
8aaad81844f0386f3dd3373b8b3bbc1f
|
|
| BLAKE2b-256 |
aa0322b0aad9ff7f13e11bed1f60936dd58751a4f8cc55bb4072d915acd0a024
|
Provenance
The following attestation bundles were made for scanwidth-0.2.0.tar.gz:
Publisher:
release.yml on nholtgrefe/scanwidth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scanwidth-0.2.0.tar.gz -
Subject digest:
8004513d8a4726b83aed9690d48fce0895751bc64d50ed6e7276f4ecb8d403aa - Sigstore transparency entry: 1397239755
- Sigstore integration time:
-
Permalink:
nholtgrefe/scanwidth@51721544809f112df0c83303b1c9d237a2e112e0 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/nholtgrefe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@51721544809f112df0c83303b1c9d237a2e112e0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scanwidth-0.2.0-py3-none-any.whl.
File metadata
- Download URL: scanwidth-0.2.0-py3-none-any.whl
- Upload date:
- Size: 46.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c05eaeab29babca2bf7d533f70fbf3dc22a9261813dd4be8aecb66578b9139d
|
|
| MD5 |
c8f8d19ef99259ee5280a223a37b437e
|
|
| BLAKE2b-256 |
44f00b3d6b2dbc464a5fb58615ff6cb5e4cd86356a3ac988aa0237843ba7c815
|
Provenance
The following attestation bundles were made for scanwidth-0.2.0-py3-none-any.whl:
Publisher:
release.yml on nholtgrefe/scanwidth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scanwidth-0.2.0-py3-none-any.whl -
Subject digest:
9c05eaeab29babca2bf7d533f70fbf3dc22a9261813dd4be8aecb66578b9139d - Sigstore transparency entry: 1397239798
- Sigstore integration time:
-
Permalink:
nholtgrefe/scanwidth@51721544809f112df0c83303b1c9d237a2e112e0 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/nholtgrefe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@51721544809f112df0c83303b1c9d237a2e112e0 -
Trigger Event:
push
-
Statement type: