Skip to content

Conversation

notmatthancock
Copy link
Contributor

  • Adds optional errorOnCycle flag to DFS algorithm
  • Sets errorOnCycle to true for topological sort
  • Adds hasCycle function

Closes #41 and partially addresses #32. For the latter, a different algorithm other than DFS would be required to implement a function who returns that actual cycles themselves.

Copy link
Member

@curran curran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great work! Apologies, it totally slipped under my radar.

@curran curran merged commit 704d9bf into datavis-tech:master May 20, 2021
@notmatthancock notmatthancock deleted the enh/topo-sort-ensure-no-cycles branch May 20, 2021 15:06
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.

topologicalSort produces invalid results for graphs with cycles
2 participants