addVertex

fun addVertex(vertex: Vertex)

Add a vertex to the graph. Fail if the vertex is already present in the graph. The vertex initially has no edges within this graph.

Parameters

vertex

The vertex to add to the graph.