Loading [MathJax]/jax/output/HTML-CSS/jax.js
CGAL 4.5 - Triangulated Surface Mesh Simplification
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Surface_mesh_simplification::Count_ratio_stop_predicate< ECM > Class Template Reference

#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h>

Definition

The class Count_ratio_stop_predicate is a model for the StopPredicate concept which returns true when the relation between the initial and current number of edges drops below a certain ratio.

Template Parameters
ECMis the type of surface mesh being simplified, and must be a model of the EdgeCollapsableSurfaceMesh concept.
Is Model Of:
StopPredicate
See Also
CGAL::Surface_mesh_simplification::Count_stop_predicate<ECM>

Creation

 Count_ratio_stop_predicate (double ratio)
 Initializes the predicate establishing the ratio.
 

Operations

bool operator() (FT const &current_cost, Profile const &edge_profile, size_type initial_count, size_type current_count) const
 Returns ( ((double)current_count / (double)initial_count) < ratio). More...
 

Member Function Documentation

template<typename ECM >
bool CGAL::Surface_mesh_simplification::Count_ratio_stop_predicate< ECM >::operator() ( FT const &  current_cost,
Profile const &  edge_profile,
size_type  initial_count,
size_type  current_count 
) const

Returns ( ((double)current_count / (double)initial_count) < ratio).

All other parameters are ignored (but exist since this is a generic policy).