next up previous
Next: 2.1.3 Adding a new Up: 2.1 Design Previous: 2.1.1 Data Format

2.1.2 Data structures

We defined a single class, Cluster. It contains a list of points and a representative point, and provides operations to add and remove points and calculate the mean point of the points in the cluster.

A LEDA point_set is used to store the dataset and compute its Delaunay triangulation. The set of clusters is stored as a LEDA array of Cluster objects. A separate special Cluster object is used to store the outlier points (the representative of this Cluster is never used, nor does it have any meaning in this context). Annotations are stored in a LEDA dictionary which maps points to the string representation of their annotation data.



Kevin Pulo
2000-08-23