Graph.hasVertex() method

Whether a vertex is in this graph.

Signature:

hasVertex(vertex: T): boolean;

Parameters

Parameter

Type

Description

vertex

T

Vertex to look for.

Returns:

boolean

true when the graph holds it.

Remarks

By identity, since vertices are Map keys. A vertex that is only pointed at by an edge and never added is not in the graph.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.