// Test of closest pair algorithms // David Eppstein, UC Irvine, 19 Apr 1997 // // Programmer interface for generation of point sets // Actual implementations will be subclassed from this outline. // // Distances are defined by subclassing PointSet from Distance. // We also define a function interact() which performs certain pairwise // interactions between points, depending on the intended application. #ifndef POINT_SET_H #define POINT_SET_H #include "Distances.h" class PointSet : public Distance { public: PointSet(unsigned long npoints) { ; } virtual ~PointSet() { ; } virtual void interact(point, point) { ; } // For agglomerative clustering, the two args are assumed to represent // clusters of some sort. This function is assumed to merge the two // clusters in a single one, which replaces the first point; the // effects on the second point are undefined. // // For cheapest insertion TSP heuristic, the two points are assumed to // represent an edge and a vertex, and are both replaced by new edges. }; #endif