class Graph<T>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) int[] |
dp |
protected int |
longestPathLength |
protected int |
n |
protected java.util.ArrayList<Vertex<T>> |
vertices |
Constructor and Description |
---|
Graph(int n) |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(int firstVertexLabel,
int secondVertexLabel) |
void |
addVertex(int label) |
int |
calculateLongestPath() |
void |
visit(Vertex<T> vertex) |