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

Function invalidateCycleFlagOnAddition

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

Source from the content-addressed store, hash-verified

1111
1112/** @internal */
1113const invalidateCycleFlagOnAddition = <N, E, T extends Kind = "directed">(
1114 mutable: MutableGraph<N, E, T>
1115): void => {
1116 // Only invalidate if the graph was acyclic (adding edges cannot remove cycles from cyclic graphs)
1117 // If already unknown (null) or cyclic (false), no need to change
1118 if (Option.isSome(mutable.isAcyclic) && mutable.isAcyclic.value === true) {
1119 mutable.isAcyclic = Option.none()
1120 }
1121}
1122
1123// =============================================================================
1124// Edge Operations

Callers 1

addEdgeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected