// Test of closest pair algorithms // David Eppstein, UC Irvine, 20 Apr 1997 // // Negate distance function to turn minimization into maximization problem #ifndef NEGATION_H #define NEGATION_H #include "PointSet.h" class Negation : public PointSet { PointSet & base; public: Negation(unsigned long n, PointSet & b) : PointSet(n), base(b) { ; } ~Negation() { delete &base; } double operator() (point a, point b) { return -base(a,b); } void interact(point a, point b) { base.interact(a,b); } }; #endif