Function
getTraversableNeighbor
(
graph: Graph<N, E, T> | MutableGraph<N, E, T>,
current: NodeIndex,
edge: Edge<E>
)
Source from the content-addressed store, hash-verified
| 2115 | : neighborsDirected(graph, nodeIndex, direction) |
| 2116 | |
| 2117 | const getTraversableNeighbor = <N, E, T extends Kind>( |
| 2118 | graph: Graph<N, E, T> | MutableGraph<N, E, T>, |
| 2119 | current: NodeIndex, |
| 2120 | edge: Edge<E> |
| 2121 | ): NodeIndex => graph.type === "undirected" && edge.target === current ? edge.source : edge.target |
| 2122 | |
| 2123 | /** |
| 2124 | * Find connected components in an undirected graph. |
Tested by
no test coverage detected