fkling / JSNetworkX

Build, process and analyze graphs in JavaScript (port of NetworkX)
https://felix-kling.de/jsnetworkx/
Other
757 stars 185 forks source link

[feature] Add 2 DAG Algorithms: ancestors and descendants #86

Open hydrosquall opened 4 years ago

hydrosquall commented 4 years ago

I went through the docs to find some algorithms for processing DAGs, and noticed these two were missing / marked as TODO. They're nearly identical ports of the Python algorithm, the only difference is a different syntax for working with Sets.

https://networkx.github.io/documentation/stable/_modules/networkx/algorithms/dag.html#descendants

Let me know if you'd like to see anything else before these get brought into the mainline branch.

Checklist