Closed Symbolk closed 3 years ago
The way to know if there's an edge from nodeA
to nodeB
would be someting like:
graph.adjacent(nodeA).find(node => node === nodeB)`
Would you also want to detect the opposite direction as well?
We could conceivably add a new method that does this.
I added the method an published as https://github.com/datavis-tech/graph-data-structure/releases/tag/v1.14.0
The way to know if there's an edge from
nodeA
tonodeB
would be someting like:graph.adjacent(nodeA).find(node => node === nodeB)`
Would you also want to detect the opposite direction as well?
We could conceivably add a new method that does this.
Ok, thanks, since this lib creates directed graph by default, checking only directed edge is reasonable.
Hi, thanks for the nice work!
However, I did not find API to check if any edge exists or not between two nodes, which is one of the common operations, and should not be hard to implement with high performance. Any tips?