|
BWAPI
|
00001 // Copyright (c) 2003,2004,2005,2006 INRIA Sophia-Antipolis (France) and 00002 // Notre Dame University (U.S.A.). All rights reserved. 00003 // 00004 // This file is part of CGAL (www.cgal.org); you may redistribute it under 00005 // the terms of the Q Public License version 1.0. 00006 // See the file LICENSE.QPL distributed with CGAL. 00007 // 00008 // Licensees holding a valid commercial license may use this file in 00009 // accordance with the commercial license agreement provided with the software. 00010 // 00011 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 // 00014 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Are_same_segments_C2.h $ 00015 // $Id: Are_same_segments_C2.h 44317 2008-07-22 12:29:01Z spion $ 00016 // 00017 // 00018 // Author(s) : Menelaos Karavelas <mkaravel@cse.nd.edu> 00019 00020 00021 #ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_2_ARE_SAME_SEGMENTS_C2_H 00022 #define CGAL_SEGMENT_DELAUNAY_GRAPH_2_ARE_SAME_SEGMENTS_C2_H 00023 00024 #include <CGAL/Segment_Delaunay_graph_2/Are_same_points_C2.h> 00025 00026 CGAL_BEGIN_NAMESPACE 00027 00028 CGAL_SEGMENT_DELAUNAY_GRAPH_2_BEGIN_NAMESPACE 00029 00030 template<class K> 00031 class Are_same_segments_C2 00032 { 00033 private: 00034 typedef Are_same_points_C2<K> Are_same_points_2; 00035 00036 private: 00037 Are_same_points_2 same_points; 00038 00039 public: 00040 typedef typename K::Site_2 Site_2; 00041 typedef bool result_type; 00042 typedef Site_2 argument_type; 00043 00044 bool operator()(const Site_2& p, const Site_2& q) const 00045 { 00046 CGAL_precondition( p.is_segment() && q.is_segment() ); 00047 00048 return 00049 ( same_points(p.source_site(), q.source_site()) && 00050 same_points(p.target_site(), q.target_site()) ) || 00051 ( same_points(p.source_site(), q.target_site()) && 00052 same_points(p.target_site(), q.source_site()) ); 00053 } 00054 }; 00055 00056 CGAL_SEGMENT_DELAUNAY_GRAPH_2_END_NAMESPACE 00057 00058 CGAL_END_NAMESPACE 00059 00060 #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_ARE_SAME_SEGMENTS_C2_H
1.7.6.1