\( \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 4.8 - 2D Polyline Simplification

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members | Public Member Functions
CGAL::Polyline_simplification_2::Stop_below_count_ratio_threshold Class Reference
Polyline Simplification Classes

`#include <CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h>`

## Definition

This class is a stop predicate returning `true` when the percentage of remaning vertices is smaller than a certain threshold.

Is Model Of:
  `PolylineSimplificationStopPredicate`.

## Public Member Functions
| Stop_below_count_ratio_threshold (double threshold)
| Initializes it with the given threshold value.
template<class CDT >
bool | operator() (const Constrained_triangulation_plus_2< CDT > &, typename Constrained_triangulation_plus_2< CDT >::Vertex_handle, typename CDT::Geom_traits::FT, std::size_t initial_count, std::size_t current_count) const
| Returns `true` when `( current_count / initial_count )` is smaller or equal than the threshold. More...

## Member Function Documentation

template<class CDT >

bool CGAL::Polyline_simplification_2::Stop_below_count_ratio_threshold::operator() | ( | const Constrained_triangulation_plus_2< CDT > & | ,
|  | typename Constrained_triangulation_plus_2< CDT >::Vertex_handle | ,
|  | typename CDT::Geom_traits::FT | ,
|  | std::size_t | initial_count,
|  | std::size_t | current_count
| ) |  | const

Returns `true` when `( current_count / initial_count )` is smaller or equal than the threshold.

Template Parameters

  CDT | must be `CGAL::Constrained_Delaunay_triangulation_2` with a vertex type that is model of `PolylineSimplificationVertexBase_2`.