Class that allows to contract iteratively edges of a simplicial complex. More...
Public Member Functions | |
void | contract_edges (int num_max_contractions=-1) |
Contract edges. More... | |
boost::optional< std::pair< Edge_handle, Placement_type > > | top_edge () |
Returns an Edge_handle and a Placement_type. This pair consists in the edge with the lowest cost in the heap together with its placement. The returned value is initialized iff the heap is non-empty. | |
Skeleton_blocker_contractor (GeometricSimplifiableComplex &complex) | |
Constructor with default policies. More... | |
Skeleton_blocker_contractor (GeometricSimplifiableComplex &complex, Cost_policy_ *cost_policy, Placement_policy_ *placement_policy=new First_vertex_placement< Profile >, Valid_contraction_policy_ *valid_contraction_policy=new Link_condition_valid_contraction< Profile >, Contraction_visitor_ *contraction_visitor=new Contraction_visitor_(), Edge_profile_factory_ *edge_profile_factory=NULL) | |
Constructor with customed policies. More... | |
Class that allows to contract iteratively edges of a simplicial complex.
The simplification algorithm consists in iteratively picking the edge with lowest cost and performing an edge contraction if the contraction is valid. This class is policy based (and much inspired from the edge collapse package of CGAL http://doc.cgal.org/latest/Surface_mesh_simplification/index.html).
Policies that can be changed are :
|
inline |
Constructor with default policies.
The default cost, placement, valid and visitor policies are respectively : the edge length, the first point, the link condition
|
inline |
Constructor with customed policies.
|
inline |
Contract edges.
While the heap is not empty, it extracts the edge with the minimum cost in the heap then try to contract it. It stops when the Stop policy says so or when the number of contractions given by 'num_max_contractions' is reached (if this number is positive).