Function
getTraversableNeighbor
(
graph: Graph<N, E, T> | MutableGraph<N, E, T>,
current: NodeIndex,
edge: Edge<E>
)
Source from the content-addressed store, hash-verified
| 3767 | } |
| 3768 | |
| 3769 | const getTraversableNeighbor = <N, E, T extends Kind>( |
| 3770 | graph: Graph<N, E, T> | MutableGraph<N, E, T>, |
| 3771 | current: NodeIndex, |
| 3772 | edge: Edge<E> |
| 3773 | ): NodeIndex => graph.type === "undirected" && edge.target === current ? edge.source : edge.target |
| 3774 | |
| 3775 | /** |
| 3776 | * Finds connected components in an undirected graph. |
Tested by
no test coverage detected