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

Directed Graphs

Program gif defines the Digraph interface. The Digraph interface extends the Graph interface defined in Program gif.

   program49195
Program: Digraph interface.

The Digraph interface adds the following methods which apply only to directed graphs to the inherited interface:

isStronglyConnected
This boolean-valued method returns true if the directed graph is strongly connected. Strong connectedness is discussed in Section gif.
topologicalOrderTraversal
A topological sort is an ordering of the nodes of a directed graph. This traversal visits the nodes of a directed graph in the order specified by a topological sort.


next up previous contents index

Bruno Copyright © 1998 by Bruno R. Preiss, P.Eng. All rights reserved.