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

Function invalidateCycleFlagOnRemoval

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

Source from the content-addressed store, hash-verified

2217
2218/** @internal */
2219const invalidateCycleFlagOnRemoval = <N, E, T extends Kind = "directed">(
2220 mutable: GraphImpl<N, E, T>
2221): void => {
2222 // Only invalidate if the graph had cycles (removing edges/nodes cannot introduce cycles in acyclic graphs).
2223 if (mutable.acyclic._tag === "Some" && mutable.acyclic.value === false) {
2224 mutable.acyclic = Option.none()
2225 }
2226}
2227
2228/** @internal */
2229const invalidateCycleFlagOnAddition = <N, E, T extends Kind = "directed">(

Callers 2

removeNodeFunction · 0.85
removeEdgeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected