ABSTRACT

The AbstractGraph class embodies algorithms that perform computations on a graph in terms of the Graph interface. This allows subclasses that use any graph representation to benefit from these algorithms. We present an implementation for an adjacency matrix in Chapter 54, and an implementation for an adjacency list in Chapter 55. Although those representations are very different, the algorithms we present in this chapter work for both.