\( \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
PolylineSimplificationStopPredicate Concept Reference
Concepts

## Definition

Models of this concept are passed to the polyline simplification algorithm to indicate when to stop the process.

Has Models:

  `CGAL::Polyline_simplification_2::Stop_below_count_ratio_threshold`

  `CGAL::Polyline_simplification_2::Stop_below_count_threshold`

  `CGAL::Polyline_simplification_2::Stop_above_cost_threshold`

## Public Member Functions
template<class CDT >
bool | operator() (const CGAL::Constrained_triangulation_plus_2< CDT > &ct, CGAL::Constrained_triangulation_plus_2< CDT >::Vertex_handle q, typename CDT::Geom_traits::FT cost, std::size_t initial_count, std::size_t current_count) const
| Indicates if the simplification must be stopped. More...

## Member Function Documentation

template<class CDT >

bool PolylineSimplificationStopPredicate::operator() | ( | const CGAL::Constrained_triangulation_plus_2< CDT > & | ct,
|  | CGAL::Constrained_triangulation_plus_2< CDT >::Vertex_handle | q,
|  | typename CDT::Geom_traits::FT | cost,
|  | std::size_t | initial_count,
|  | std::size_t | current_count
| ) |  | const

Indicates if the simplification must be stopped.

This is called right before each vertex is about to be removed.

Parameters

  ct | The underlying constrained Delaunay triangulation which embeds the polyline constraints
  q | The current vertex about to be removed
  cost | The associated cost for removing the current vertex (as given by `PolylineSimplificationCostFunction`)
  initial_count | The initial number of vertices in the entire polyline set (including intersection vertices not in any source polyline)
  current_count | The current number of vertices

Returns
  `true` if the algorithm should stop, `false` if it should continue.

Template Parameters

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