14 #pragma push_macro("ERROR")
17 #include <boost/graph/graph_traits.hpp>
18 #include <boost/graph/properties.hpp>
37 typename HalfedgeGraph,
43 typename vertex_iterator =
44 typename boost::graph_traits< HalfedgeGraph >::vertex_iterator >
58 vertex_iterator vi = iterator_pair.first;
59 vertex_iterator vi_end = iterator_pair.second;
60 auto nb_vertices = std::distance(iterator_pair.first, iterator_pair.second);
62 return static_cast< int >(nb_vertices);
72 const std::list< vertex_descriptor > &spanning_tree = st.get_spanning_tree_vertices();
75 bool last_was_1 =
false;
76 std::list< vertex_descriptor > remaining_adjacent_vertices_of_last_v, tmp;
77 std::map<vertex_descriptor, bool> processed_vertices;
79 typename std::list< vertex_descriptor >::const_iterator it =
80 spanning_tree.begin(), it_e = spanning_tree.end();
82 for( ; (it != it_e) && (it_list != it_list_e); ++it)
85 processed_vertices[*it] =
true;
86 bool is_adjacent_to_former_1 =
false;
89 auto it_to_remove = std::find(remaining_adjacent_vertices_of_last_v.begin(),
90 remaining_adjacent_vertices_of_last_v.end(), *it) ;
91 is_adjacent_to_former_1 = (it_to_remove != remaining_adjacent_vertices_of_last_v.end());
92 if(is_adjacent_to_former_1)
93 remaining_adjacent_vertices_of_last_v.erase(it_to_remove);
94 if(remaining_adjacent_vertices_of_last_v.empty())
98 if(*it == (*it_list).get_vkept())
108 remaining_adjacent_vertices_of_last_v.insert(remaining_adjacent_vertices_of_last_v.end(), tmp.begin(), tmp.end());
110 else if(!is_adjacent_to_former_1)
145 for( ; it_list != ite; ++it_list)
159 for( ; it_list != ite; ++it_list)
178 const std::list< Collapse_info< HalfedgeGraph, PointMap > > &
_list_memory;