00001 #ifndef ATLFAST_CLOSE_H 00002 #define ATLFAST_CLOSE_H 00010 template<class Distance, class Point> 00011 class Close{ 00012 public: 00013 Close(){}; 00014 Close(Distance min, Point point):m_min(min), m_point(point){}; 00015 bool operator()(Point i){ 00016 return bool ( abs(i-m_point) < m_min); 00017 } 00018 Distance min() const {return m_min;} 00019 Point point() const {return m_point;} 00020 private: 00021 Distance m_min; 00022 Point m_point; 00023 }; 00024 template <class D, class P> 00025 std::ostream& operator<<(std::ostream& o, const Close<D,P>& c){ 00026 o<<"["<<c.min()<<","<<c.point()<<"]"; 00027 } 00028 #endif 00029 00030 00031 00032 00033 00034 00035 00036