Skip to content

Add 'shortest_path' method#61

Merged
mdickinson merged 1 commit into
masterfrom
feature/shortest-path
Jan 31, 2017
Merged

Add 'shortest_path' method#61
mdickinson merged 1 commit into
masterfrom
feature/shortest-path

Conversation

@mdickinson
Copy link
Copy Markdown
Owner

When asking "what's keeping object X alive", it's very useful to be able to look for a short path between a known (expected) live object and the target object X. Useful source objects are things like (a) sys.modules, (b) the current TestCase object.

This PR adds a simple shortest_path method to all directed graphs that does a breadth-first search to find and return one of the shortest paths.

@mdickinson mdickinson merged commit f936500 into master Jan 31, 2017
@mdickinson mdickinson deleted the feature/shortest-path branch January 31, 2017 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants