All the examples illustrating each algorithm's description refer to the two following simple implementations of a model of Location and Geo-Value:
class location2d{
public:
typedef int coordinate_type;
location2d(int X, int Y) {coord[0]=X; coord[1]=Y;}
int& operator[](unsigned int i) {
assert(i<2); return coord[i];
}
private:
int coord[2];
};
class geo_value2d{
public:
typedef double property_type;
typedef location2d location_type;
geo_value2d();
geo_value2d(location2d u, double prop) : loc(u), pval(prop) {};
const location_type& location() const {return loc;}
property_type& property_value() {return pval;}
const property_type& property_value() const {return pval;}
private:
double pval;
location2d loc;
};