Note

This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.

rustworkx.dominance_frontiers#

dominance_frontiers(graph, start_node, /)#

Compute the dominance frontiers of all nodes in a directed graph.

The dominance and dominance frontiers computations use the algorithms published in 2006 by Cooper, Harvey, and Kennedy (https://hdl.handle.net/1911/96345).

Parameters:
  • graph (PyDiGraph) – directed graph

  • start_node (int) – the start node for the dominance computation

Returns:

a mapping of node indices to their dominance frontiers

Return type:

dict[int, set[int]]

Raises: