A Generic Design Concept for Geometric Algorithms


The design phase of an algorithm's implementation is confronted with the issues of efficiency, flexibility, and ease-of-use. We suggest a concept that greatly increases the flexibility of an implementation without sacrificing its ease-of-use. The loss in terms of efficiency is small.

In order to show the practical relevance and efficiency of our concepts, we compare a generic to an object-oriented implementation of a rectangle intersection algorithm in terms of runtime. The following interface documentations of our implementations are available.

The source code of our implementations is also available.

We compared our implementations on eight different example classes. For each of the example classes, we generated 30 examples of 250, 500, ... , 3000 rectangles. These are available in the gzipped tar archives below.

A complete discription of these instances is taken from [WWKS01]. They are characterised by the number of intersections.

The following files contain the runtimes of our tests on a Sparc-Ultra-1. There, we used the SUN CC-4.2 compiler. We investigated two different settings, namely

The following files contain the runtimes of our tests on an SGI-IP27. There, we used the mipsPRO CC-7.1 compiler. As above, we investigated two different settings, namely Each point in the above graphs shows the average runtime on 30 different examples of the given example class.

The test program, which created the above graphs is also available.


Alexander Wolff
Last modified: Thu Apr 26 19:27:01 MEST 2001