to_series_graph()
Collapse a cell graph to one node per bound series.
Usage
to_series_graph(
graph,
bindings,
*,
workbook,
catalog=None,
include_self_loops=False,
blank_ranges=None
)This is the series-level analogue of to_sheet_graph: cell edges between the same pair of series become one directed edge labeled with the underlying cell-edge count. Intra-series edges are dropped unless include_self_loops=True. The quotient is not a schedule DAG and may contain cycles even when the cell graph does not.
Parameters
graph: DependencyGraph-
Cell-level dependency graph.
bindings: WorkbookSeriesBindings-
Validated series bindings.
workbook: Path | str-
Workbook path used to expand series geometry when
catalogis omitted. catalog: SeriesCatalog | None = None-
Precomputed occupancy catalog. When omitted,
build_catalogruns. include_self_loops: bool = False-
If
True, keep intra-series cell edges as a self-loop per series. blank_ranges: Iterable[str] | None = None-
Sheet-qualified rectangles omitted from the graph. Forwarded to catalog expansion when
catalogis omitted.
Returns
SeriesGraph- Immutable series graph. Node order follows bindings order.
Raises
SemanticCatalogError- Catalog expansion fail-closed.