-
Notifications
You must be signed in to change notification settings - Fork 61
ExecuteDFS (generic depth first search) #459
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
Conversation
…into new-dfs Continueing to convert methods
doc/oper.xml
Outdated
| causing us to backtrack. This vertex is stored in <A>record</A>.child and its parent is stored | ||
| in <A>record</A>.current</Item> | ||
| <Item><A>AncestorFunc</A>: this function is called when (<A>record</A>.current, | ||
| <A>record</A>.child) is an edge and <A>record</A>.child is an ancestor of <A>record</A>.current. An ancestor here means that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <A>record</A>.child) is an edge and <A>record</A>.child is an ancestor of <A>record</A>.current. An ancestor here means that | |
| <A>record</A>.child) is an edge and <C><A>record</A>.child</C> is an ancestor of <A>record</A>.current. An ancestor here means that |
doc/oper.xml
Outdated
|
|
||
| The record also stores a further 4 attributes. | ||
| <List> | ||
| <Item><E>current</E>: the current vertex that is being visited</Item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use mark here too?
doc/oper.xml
Outdated
| </List> | ||
|
|
||
| Initially, the current and child attributes will have -1 values and the lists (parent, | ||
| preorder and postorder) will have -1 values at all of their indicies as no vertex has |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| preorder and postorder) will have -1 values at all of their indicies as no vertex has | |
| <C>preorder</C> and <C>postorder</C>) will have <C>-1</C> values at all of their indices as no vertex has |
james-d-mitchell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor suggestions for the doc, I think this is great otherwise, and is a real improvement!
…into new-dfs-adapted
|
Extreme tests: UndirectedSpanningForest DigraphPath DigraphTopologicalSort DigraphLongestDistanceFromVertex IsAntisymmetricDigraph IsAcyclicDigraph DIGRAPHS_ArticulationPointsBridgesStrongOrientation VerticesReachableFrom DominatorTree |
In particular, this pretty much reverses commit: d9f060c
In particular, this pretty much reverses commit: d9f060c
In particular, this pretty much reverses commit: d9f060c
In this pull request, I submit my work for VP2215.
I did this to resolve the issue noted in #393
From this pull request you will see that I have created:
preorder function, postorder function, ancestor function and a cross function.
current and child attributes
The generic depth first search algorithm works as follows:
I also refactored the existing DFS implementations in: