Less than 1 minute
Home > @hz-9/algorithm > Graph > hasVertex
Graph.hasVertex() method
Check if a vertex exists in the graph.
检查顶点是否存在于图中。
Signature:
hasVertex(vertex: T | Vertice<T>): boolean;Parameters
Parameter | Type | Description |
|---|---|---|
vertex | T | Vertice<T> | The vertex to check. |
Returns:
boolean
Whether the vertex exists.