$ open source · GPL-3.0 — need a commercial license? imqueue.com →

Graph.delVertex() method

Removes vertices along with the edges leading out of them.

Signature:

delVertex(...vertex: T[]): Graph<T>;

Parameters

Parameter

Type

Description

vertex

T[]

Vertices to remove.

Returns:

Graph<T>

This graph, for chaining.

Remarks

Edges pointing AT a removed vertex are left behind, so other vertices can go on naming one that is gone — and a walk that follows such an edge simply finds no further edges rather than failing.