Skip to main content

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

scanwidth-0.2.0.tar.gz (37.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scanwidth-0.2.0-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

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

Hashes for scanwidth-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8004513d8a4726b83aed9690d48fce0895751bc64d50ed6e7276f4ecb8d403aa
MD5 8aaad81844f0386f3dd3373b8b3bbc1f
BLAKE2b-256 aa0322b0aad9ff7f13e11bed1f60936dd58751a4f8cc55bb4072d915acd0a024

See more details on using hashes here.

Provenance

The following attestation bundles were made for scanwidth-0.2.0.tar.gz:

Publisher: release.yml on nholtgrefe/scanwidth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for scanwidth-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c05eaeab29babca2bf7d533f70fbf3dc22a9261813dd4be8aecb66578b9139d
MD5 c8f8d19ef99259ee5280a223a37b437e
BLAKE2b-256 44f00b3d6b2dbc464a5fb58615ff6cb5e4cd86356a3ac988aa0237843ba7c815

See more details on using hashes here.

Provenance

The following attestation bundles were made for scanwidth-0.2.0-py3-none-any.whl:

Publisher: release.yml on nholtgrefe/scanwidth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page