MCPcopy Create free account
hub / github.com/Effect-TS/effect / getTraversableNeighbor

Function getTraversableNeighbor

packages/effect/src/Graph.ts:3769–3773  ·  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

3767}
3768
3769const 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.

Callers 2

isAcyclicFunction · 0.85
Graph.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected