BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Segment_Delaunay_graph_2/Compare_y_2.h
Go to the documentation of this file.
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/Compare_y_2.h $
00015 // $Id: Compare_y_2.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_COMPARE_Y_2_H
00022 #define CGAL_SEGMENT_DELAUNAY_GRAPH_2_COMPARE_Y_2_H
00023 
00024 #include <CGAL/Segment_Delaunay_graph_2/basic.h>
00025 
00026 CGAL_BEGIN_NAMESPACE
00027 
00028 CGAL_SEGMENT_DELAUNAY_GRAPH_2_BEGIN_NAMESPACE
00029 
00030 
00031 //-----------------------------------------------------------------------
00032 //                           compare y
00033 //-----------------------------------------------------------------------
00034 
00035 template< class K >
00036 class Compare_y_2
00037 {
00038 public:
00039   typedef typename K::Site_2                Site_2;
00040   typedef typename K::Point_2               Point_2;
00041   typedef typename K::Comparison_result     result_type;
00042 
00043 private:
00044   typedef typename K::Compare_y_2           Kernel_compare_y_2;
00045 
00046 public:
00047 
00048   result_type operator()(const Site_2& p, const Site_2& q) const
00049   {
00050     CGAL_precondition( p.is_point() && q.is_point() );
00051     return Kernel_compare_y_2()( p.point(), q.point() );
00052   }
00053 };
00054 
00055 CGAL_SEGMENT_DELAUNAY_GRAPH_2_END_NAMESPACE
00056 
00057 CGAL_END_NAMESPACE
00058 
00059 #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_COMPARE_Y_2_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines