Package org.graph4j.util
Class VertexStack
java.lang.Object
org.graph4j.util.VertexCollection
org.graph4j.util.VertexStack
A stack of vertices in a graph.
- Author:
- Cristian Frăsinaru
-
Field Summary
Fields inherited from class org.graph4j.util.VertexCollection
bitset, DEFAULT_CAPACITY, first, graph, numVertices, vertices -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.graph4j.util.VertexCollection
add, addAll, clear, computeVerticesWeight, contains, equals, getGraph, grow, hashCode, indexOf, indexOf, isClique, isEmpty, isStableSet, iterator, numVertices, remove, removeAll, removeFromPos, removeLast, retainAll, size, toString, union, vertexToString, verticesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
VertexStack
-
VertexStack
-
-
Method Details
-
push
public void push(int v) - Parameters:
v- a vertex number.
-
peek
public int peek()- Returns:
- the last element added to the stack.
-
pop
public int pop()Returns and removes the last element added to the stack.- Returns:
- the last element added to the stack.
-