13 #include <boost/graph/graph_traits.hpp>
14 #include <boost/graph/properties.hpp>
24 template <
typename Graph,
typename Po
intMap,
typename GeometryTraits = FEVV::Geometry_traits<Graph> >
30 typedef typename GeometryTraits::Scalar
Scalar;
35 const GeometryTraits
_gt;
44 if(v1==GraphTraits::null_vertex())
49 if(v2==GraphTraits::null_vertex())
58 return _gt.get_x(pv1) <
_gt.get_x(pv2);
60 return _gt.get_y(pv1) <
_gt.get_y(pv2);
62 return _gt.get_z(pv1) <
_gt.get_z(pv2);
67 auto e_v1_deg = std::distance(e_v1.first, e_v1.second),
68 e_v2_deg = std::distance(e_v2.first, e_v2.second);
69 if( e_v1_deg != e_v2_deg)
70 return e_v1_deg < e_v2_deg ;
73 decltype(e_v1_deg) e_v1_min_deg = 1000, e_v1_max_deg = 0, e_v2_min_deg = 1000, e_v2_max_deg = 0;
74 auto iter_e_v = e_v1.first;
75 for( ; iter_e_v!=e_v1.second; ++iter_e_v)
78 auto current_deg = std::distance(e_vopp.first, e_vopp.second);
79 if (current_deg < e_v1_min_deg)
80 e_v1_min_deg = current_deg;
81 if (current_deg > e_v1_max_deg)
82 e_v1_max_deg = current_deg;
83 e_v1_deg += current_deg;
86 iter_e_v = e_v2.first;
87 for( ; iter_e_v!=e_v2.second; ++iter_e_v)
90 auto current_deg = std::distance(e_vopp.first, e_vopp.second);
91 if (current_deg < e_v2_min_deg)
92 e_v2_min_deg = current_deg;
93 if (current_deg > e_v2_max_deg)
94 e_v2_max_deg = current_deg;
95 e_v2_deg += current_deg;
98 if( e_v1_deg != e_v2_deg)
99 return e_v1_deg < e_v2_deg ;
101 if (e_v1_min_deg != e_v2_min_deg)
102 return e_v1_min_deg < e_v2_min_deg;
104 if (e_v1_max_deg != e_v2_max_deg)
105 return e_v1_max_deg < e_v2_max_deg;
111 template <
typename Graph,
typename Po
intMap,
typename GeometryTraits = FEVV::Geometry_traits<Graph> >
113 Vertex_comparator<Graph, PointMap, GeometryTraits>