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

Function removeEdge

packages/effect/src/Graph.ts:2827–2837  ·  view source on GitHub ↗
(
  mutable: MutableGraph<N, E, T>,
  edgeIndex: EdgeIndex
)

Source from the content-addressed store, hash-verified

2825 * @since 3.18.0
2826 */
2827export const removeEdge = <N, E, T extends Kind = "directed">(
2828 mutable: MutableGraph<N, E, T>,
2829 edgeIndex: EdgeIndex
2830): void => {
2831 const impl = getMutableImplForMutation(mutable)
2832 // Only invalidate cycle flag if an edge was actually removed
2833 // and only if the graph wasn't already known to be acyclic
2834 if (removeEdgeInternal(impl, edgeIndex)) {
2835 invalidateCycleFlagOnRemoval(impl)
2836 }
2837}
2838
2839/**
2840 * Removes multiple edges from a mutable graph.

Callers

nothing calls this directly

Calls 3

removeEdgeInternalFunction · 0.85

Tested by

no test coverage detected