( mutable: MutableGraph<N, E, T>, edgeIndex: EdgeIndex )
| 2426 | * @since 3.18.0 |
| 2427 | */ |
| 2428 | export const removeEdge = <N, E, T extends Kind = "directed">( |
| 2429 | mutable: MutableGraph<N, E, T>, |
| 2430 | edgeIndex: EdgeIndex |
| 2431 | ): void => { |
| 2432 | assertMutable(mutable) |
| 2433 | const impl = graphImpl(mutable) |
| 2434 | |
| 2435 | const wasRemoved = removeEdgeInternal(impl, edgeIndex) |
| 2436 | |
| 2437 | // Only invalidate cycle flag if an edge was actually removed |
| 2438 | // and only if the graph wasn't already known to be acyclic |
| 2439 | if (wasRemoved) { |
| 2440 | invalidateCycleFlagOnRemoval(impl) |
| 2441 | } |
| 2442 | } |
| 2443 | |
| 2444 | /** @internal */ |
| 2445 | const removeEdgeInternal = <N, E, T extends Kind = "directed">( |
no test coverage detected