Logo Data Structures and Algorithms with Object-Oriented Design Patterns in Java
next up previous contents index

Implementing Undirected Graphs

 

This section describes two concrete classes--GraphAsMatrix and GraphAsLists. These classes both represent undirected graphs. The GraphAsMatrix class represents the edges of a graph using an adjacency matrix. The GraphAsLists class represents the edges of a graph using adjacency lists.