Using Design Patterns for Reusable, Efficient Implementations of Graph Algorithms
Dietmar Kühl, Karsten Weihe · KOPS (University of Konstanz) · 1996
Software reusability is an important and difficult problem in general, and this is in particular true for graph algorithms. The usual way to address reusability of graph algorithms is to provide a standard--setting library of data structures (incl. various kinds of graphs), on which graph algorithms may be implemented. In this working paper, we discuss the disadvantages to this approach, and we propose a couple of domain design patterns to overcome these disadvantages. To apply design patterns, we shift the focus from data structures as the primary units of reuse to algorithms themselves. So far, our concept is highly immature, and so is this paper. In fact, this paper merely reflects the state of our discussion and is intended to serve as a base for further dicussions. We are currently implementing a case study (maximum flow problem) in C++ to evaluate our ideas empirically.