MCPcopy Index your code
hub / github.com/Effect-TS/effect / getTraversableNeighbor

Function getTraversableNeighbor

packages/effect/src/Graph.ts:2117–2121  ·  view source on GitHub ↗
(
  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
2117const 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.

Callers 2

dijkstraFunction · 0.85
astarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected