Go to the documentation of this file.
14 #include <boost/graph/graph_traits.hpp>
15 #include <boost/graph/properties.hpp>
16 #include <CGAL/boost/graph/iterator.h>
35 typename HalfedgeGraph,
36 typename edge_descriptor =
37 typename boost::graph_traits< HalfedgeGraph >::edge_descriptor,
43 bool operator()(
const std::tuple< edge_descriptor, double, Point > &e1,
44 const std::tuple< edge_descriptor, double, Point > &e2)
const
46 double w1 = std::get< 1 >(e1);
47 double w2 = std::get< 1 >(e2);
59 typename HalfedgeGraph,
67 typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor;
69 typename boost::graph_traits< HalfedgeGraph >::edge_iterator;
71 typename boost::graph_traits< HalfedgeGraph >::edge_descriptor;
77 typedef std::priority_queue<
78 std::tuple< edge_descriptor, double, Point >,
79 std::vector< std::tuple< edge_descriptor, double, Point > >,
85 typedef std::map< edge_descriptor, std::pair< double, Point > >
edge2cost_map;
111 std::tuple< typename boost::graph_traits< HalfedgeGraph >::edge_descriptor,
128 if(is_normal_present)
132 return is_opposite_present;
136 boost::iterator_range<
137 CGAL::Halfedge_around_target_iterator< HalfedgeGraph > >
138 iterator_range = CGAL::halfedges_around_target(vs,
_g);
140 for(
auto h_around : iterator_range)
144 typename std::map< edge_descriptor, std::pair< double, Point > >::iterator
156 std::cerr <<
"remove_old_edges: edge not found " << std::endl;
162 iterator_range = CGAL::halfedges_around_target(vt,
_g);
164 for(
auto h_around : iterator_range)
175 std::pair< double, Point > >::iterator it =
187 std::cerr <<
"remove_old_edges: edge not found " << std::endl;
priority_queue_edges _queue
typename boost::graph_traits< HalfedgeGraph >::halfedge_descriptor halfedge_descriptor
bool is_present_in_map(edge_descriptor e) const
edge2cost_map _edges_cost
queue with the cost/weight as the key
typename boost::graph_traits< HalfedgeGraph >::vertex_descriptor vertex_descriptor
typename FEVV::Geometry_traits< HalfedgeGraph >::Point Point
virtual std::string get_as_string() const =0
std::priority_queue< std::tuple< edge_descriptor, double, Point >, std::vector< std::tuple< edge_descriptor, double, Point > >, Compare_weights2< HalfedgeGraph > > priority_queue_edges
size_t get_size_queue() const
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor opposite(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the halfedge with source and target swapped.
Refer to Geometry_traits_documentation_dummy for further documentation on provided types and algorith...
void remove_old_edges(vertex_descriptor vs, vertex_descriptor vt)
void delete_from_descriptors(edge_descriptor e)
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor source(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the source vertex of e.
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor edge(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor h, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns the edge corresponding to h and opposite(h).
Abstract class to compute the collapse cost of each edge in a mesh. It also manages a priority queue ...
virtual void compute_error()=0
Error_metric(HalfedgeGraph &g, PointMap &pm, Kept_position< HalfedgeGraph, PointMap > *vkept, FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > &dequantiz)
virtual double compute_cost_edge(edge_descriptor e, const Point &collapsePos)=0
typename FEVV::Geometry_traits< HalfedgeGraph >::Vector Vector
typename FEVV::Geometry_traits< HalfedgeGraph > Geometry
Interfaces for plugins These interfaces will be used for different plugins.
double get_top_cost() const
double get_mean_threshold() const
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::halfedge_descriptor halfedge(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor v, const FEVV::DataStructures::AIF::AIFMesh &sm)
Returns a halfedge with target v.
boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::vertex_descriptor target(typename boost::graph_traits< FEVV::DataStructures::AIF::AIFMesh >::edge_descriptor e, const FEVV::DataStructures::AIF::AIFMesh &)
Returns the target vertex of e.
Kept_position< HalfedgeGraph, PointMap > * _vkept
std::tuple< typename boost::graph_traits< HalfedgeGraph >::edge_descriptor, double, typename Geometry::Point > get_top_queue() const
std::map< edge_descriptor, std::pair< double, Point > > edge2cost_map
FEVV::Filters::Uniform_dequantization< HalfedgeGraph, PointMap > & _dequantiz
typename boost::graph_traits< HalfedgeGraph >::edge_iterator edge_iterator
FEVV::Filters::VKEPT_POSITION _operator
typename boost::graph_traits< HalfedgeGraph >::edge_descriptor edge_descriptor
boost::graph_traits< MeshT >::vertex_descriptor vertex_descriptor
bool operator()(const std::tuple< edge_descriptor, double, Point > &e1, const std::tuple< edge_descriptor, double, Point > &e2) const
Kept_position< HalfedgeGraph, PointMap > * get_vkept()