\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 5.0 - Triangulated Surface Mesh Simplification
CGAL::Surface_mesh_simplification::Count_ratio_stop_predicate< TriangleMesh > 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
TriangleMeshis the type of surface mesh being simplified, and must be a model of the MutableFaceGraph and HalfedgeListGraph concepts.
Is Model Of:
StopPredicate
See also
CGAL::Surface_mesh_simplification::Count_stop_predicate<TriangleMesh>

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

◆ operator()()

template<typename TriangleMesh >
bool CGAL::Surface_mesh_simplification::Count_ratio_stop_predicate< TriangleMesh >::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).