contents next up previous
Next: Construct Non-Parametric Cdf Up: Algorithms and Classes Previous: Algorithms and Classes


Algorithms

The descriptions of the algorithms follow the same layout used by Austern:

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;
};



Subsections

nicolas
2002-05-07