The
Graph class uses
Hash Tables
(as implemented by
java.util.Hashtable)
to efficiently access a vertex's adjacency list.
The Hashtable type is parameterized by its keys and
values:
- The graph's hash table keys are of type Vertex
- The graph's hash table values are of type List<Vertex>
The instance field declaration for the hash table:
private Hashtable<Vertex, List<Vertex>> adj_hash;