Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cycle aware algorithm for propagating markers #4645

Closed
wants to merge 2 commits into from

Commits on Jun 29, 2024

  1. Remove edges from Graph in reverse order

    petgraph::Graph is a delicate datastructure where node, edge identifiers
    are only stable across certain operations. Edges have to be removed
    carefully.
    bluss committed Jun 29, 2024
    Configuration menu
    Copy the full SHA
    8e5a293 View commit details
    Browse the repository at this point in the history
  2. Use cycle aware algorithm for propagating markers

    The strongly connected components algorithm both finds all cyclic
    subgraphs, and a topological order of them. This seems to be a good
    way to replace Topo with something cycle-aware.
    
    The new algorithm uses the fact that in a strongly connected component,
    all vertices reach each other through some edge. That means we can
    combine markers of all internal edges in a component.
    
    As an optimization, only outgoing edges pointing out of the current
    component are updated. I didn't look outside this function, so don't
    know if that's a reasonable choice.
    bluss committed Jun 29, 2024
    Configuration menu
    Copy the full SHA
    7e09dd9 View commit details
    Browse the repository at this point in the history