// ====================================================================== // // Copyright (c) 1997 The CGAL Consortium // // This software and related documentation is part of an INTERNAL release // of the Computational Geometry Algorithms Library (CGAL). It is not // intended for general use. // // ---------------------------------------------------------------------- // // release : // release_date : 2000, August 09 // // file : include/CGAL/Range_segment_tree_traits.h // package : SearchStructures (2.54) // maintainer : Philipp Kramer // source : include/CGAL/Range_segment_tree_traits.h // revision : $Revision$ // revision_date : $Date$ // author(s) : Gabriele Neyer // // coordinator : Peter Widmayer, ETH Zurich // // // email : cgal@cs.uu.nl // // ====================================================================== #ifndef CGAL_RANGE_SEGMENT_TREE_TRAITS_H #define CGAL_RANGE_SEGMENT_TREE_TRAITS_H #include #include #include #include #include CGAL_BEGIN_NAMESPACE template class C_Compare_1{ public: bool operator()(const Key_1& k1, const Key_1& k2) { return SMALLER == (int)compare_x(k1,k2); } }; template class C_Compare_2{ public: bool operator()(const Key_2& k1, const Key_2& k2) { return SMALLER == (int)compare_y(k1,k2); } }; template class C_Compare_3{ public: bool operator()(const Key_3& k1, const Key_3& k2) { return SMALLER == (int)compare_z(k1,k2); } }; template class C_Low_1{ public: Key_1 operator()(const Interval& i) { return i.first;} }; template class C_High_1{ public: Key_1 operator()(const Interval& i) { return i.second;} }; template class C_Low_2{ public: Key_2 operator()(const Interval& i) { return i.first;} }; template class C_High_2{ public: Key_2 operator()(const Interval& i) { return i.second;} }; template class C_Low_3{ public: Key_3 operator()(const Interval& i) { return i.first;} }; template class C_High_3{ public: Key_3 operator()(const Interval& i) { return i.second;} }; template class C_Key_1{ public: Key_1 operator()(const Key_1& k) { return k;} }; template class C_Key_2{ public: Key_2 operator()(const Key_2& k) { return k;} }; template class C_Key_3{ public: Key_3 operator()(const Key_3& k) { return k;} }; template class T_Key_1{ public: Key_1 operator()(const Key& k) { return k.first;} }; template class T_Key_2{ public: Key_2 operator()(const Key& k) { return k.first;} }; template class T_Key_3{ public: Key_3 operator()(const Key& k) { return k.first;} }; template class Range_tree_map_traits_2{ public: typedef T Value; typedef typename Rep::Point_2 Point_2; typedef Point_2 Pure_key; typedef std::pair Key; typedef Point_2 Key_1; typedef Point_2 Key_2; typedef std::pair Interval; typedef C_Compare_1 compare_1; typedef C_Compare_2 compare_2; typedef C_Low_1 low_1; typedef C_High_1 high_1; typedef T_Key_1 key_1; typedef C_Low_2 low_2; typedef C_High_2 high_2; typedef T_Key_2 key_2; }; template class T_Low_1{ public: Key_1 operator()(const Interval& i) { return i.first.first;} }; template class T_High_1{ public: Key_1 operator()(const Interval& i) { return i.second.first;} }; template class T_Low_2{ public: Key_2 operator()(const Interval& i) { return i.first.first;} }; template class T_High_2{ public: Key_2 operator()(const Interval& i) { return i.second.first;} }; template class T_Low_3{ public: Key_3 operator()(const Interval& i) { return i.first.first;} }; template class T_High_3{ public: Key_3 operator()(const Interval& i) { return i.second.first;} }; template class Range_tree_map_traits_3{ public: typedef typename Rep::Point_3 Point_3; typedef std::pair Key; typedef Point_3 Pure_key; typedef Point_3 Key_1; typedef Point_3 Key_2; typedef Point_3 Key_3; typedef std::pair Interval; typedef C_Compare_1 compare_1; typedef C_Compare_2 compare_2; typedef C_Compare_3 compare_3; typedef T_Low_1 low_1; typedef T_High_1 high_1; typedef T_Key_1 key_1; typedef T_Low_2 low_2; typedef T_High_2 high_2; typedef T_Key_2 key_2; typedef T_Low_3 low_3; typedef T_High_3 high_3; typedef T_Key_3 key_3; }; template class S_Low_1{ public: Key_1 operator()(const Interval& i) { return i.first.first;} }; template class S_High_1{ public: Key_1 operator()(const Interval& i) { return i.first.second;} }; template class S_Low_2{ public: Key_2 operator()(const Interval& i) { return i.first.first;} }; template class S_High_2{ public: Key_2 operator()(const Interval& i) { return i.first.second;} }; template class S_Low_3{ public: Key_3 operator()(const Interval& i) { return i.first.first;} }; template class S_High_3{ public: Key_3 operator()(const Interval& i) { return i.first.second;} }; template class Segment_tree_map_traits_2{ public: typedef T Value; typedef typename Rep::Point_2 Point_2; typedef Point_2 Key; typedef Point_2 Key_1; typedef Point_2 Key_2; typedef std::pair Pure_interval; typedef std::pair Interval; typedef C_Compare_1 compare_1; typedef C_Compare_2 compare_2; typedef S_Low_1 low_1; typedef S_High_1 high_1; typedef C_Key_1 key_1; typedef S_Low_2 low_2; typedef S_High_2 high_2; typedef C_Key_2 key_2; }; template class Segment_tree_map_traits_3{ public: typedef typename Rep::Point_3 Point_3; typedef Point_3 Key; typedef Point_3 Key_1; typedef Point_3 Key_2; typedef Point_3 Key_3; typedef std::pair Pure_interval; typedef std::pair Interval; typedef C_Compare_1 compare_1; typedef C_Compare_2 compare_2; typedef C_Compare_3 compare_3; typedef S_Low_1 low_1; typedef S_High_1 high_1; typedef C_Key_1 key_1; typedef S_Low_2 low_2; typedef S_High_2 high_2; typedef C_Key_2 key_2; typedef S_Low_3 low_3; typedef S_High_3 high_3; typedef C_Key_3 key_3; }; template class Range_segment_tree_set_traits_3{ public: typedef typename Rep::Point_3 Point_3; typedef Point_3 Key; typedef Point_3 Key_1; typedef Point_3 Key_2; typedef Point_3 Key_3; typedef std::pair Interval; typedef C_Compare_1 compare_1; typedef C_Compare_2 compare_2; typedef C_Compare_3 compare_3; typedef C_Low_1 low_1; typedef C_High_1 high_1; typedef C_Key_1 key_1; typedef C_Low_2 low_2; typedef C_High_2 high_2; typedef C_Key_2 key_2; typedef C_Low_3 low_3; typedef C_High_3 high_3; typedef C_Key_3 key_3; }; template class Range_segment_tree_set_traits_2{ public: typedef typename Rep::Point_2 Point_2; typedef Point_2 Key; typedef Point_2 Key_1; typedef Point_2 Key_2; typedef std::pair Interval; typedef C_Compare_1 compare_1; typedef C_Compare_2 compare_2; typedef C_Low_1 low_1; typedef C_High_1 high_1; typedef C_Key_1 key_1; typedef C_Low_2 low_2; typedef C_High_2 high_2; typedef C_Key_2 key_2; }; CGAL_END_NAMESPACE #endif // CGAL_RANGE_SEGMENT_TREE_TRAITS_H