Simple directed graph forming a cycle of n vertices numbered from 0 to n-1. REQUIRE: n > 0

By: ThorstenSeitz

no subtypes hierarchy

Initializer
Cycle(Integer n)
Parameters:
  • n
    • n > 0
Attributes
emptySource Codeshared actual Boolean empty

Answer whether the graph is empty, i.e. contains no vertices.

Refines ImplicitAdjacencyGraph.empty (empty) ultimately refines AdjacencyGraph.empty (empty)
verticesSource Codeshared actual default {Integer*} vertices

All vertices of the graph.

Refines VertexList.vertices (vertices)
Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: AdjacencyGraph<V>
empty, notEmpty
Attributes inherited from: VertexList<V>
vertices
Inherited Methods
Methods inherited from: ImplicitAdjacencyGraph<V>
bfsTraversal, neighbors
Methods inherited from: Object
Methods inherited from: AdjacencyGraph<V>
containsEdge, degreeOf, forEachNeighbor, hasNeighbors, neighbors
Methods inherited from: VertexList<V>
containsVertex