Less than 1 minute
Home > @hz-9/algorithm > Graph > removeEdge
Graph.removeEdge() method
Remove an edge from the graph.
从图中删除边。
Signature:
removeEdge(fromVertex: T | Vertice<T>, toVertex: T | Vertice<T>): boolean;Parameters
Parameter | Type | Description |
|---|---|---|
fromVertex | T | Vertice<T> | The first vertex of the edge. (If the graph is directed, the order of vertices matters.) |
toVertex | T | Vertice<T> | The second vertex of the edge. |
Returns:
boolean
Whether the edge is successfully removed.