"Fossies" - the Fresh Open Source Software Archive

Member "doc_html/Polyline_simplification_2/classCGAL_1_1Polyline__simplification__2_1_1Squared__distance__cost.html" (8 Nov 2019, 13462 Bytes) of package /linux/misc/CGAL-4.14.2-doc_html.tar.xz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the CGAL-4.14.2-doc_html.tar.xz project site itself.

\( \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.14.2 - 2D Polyline Simplification
CGAL::Polyline_simplification_2::Squared_distance_cost Class Reference

#include <CGAL/Polyline_simplification_2/Squared_distance_cost.h>

Definition

This class is a cost function which calculates the cost as the square of the distance between the original and simplified polylines.

Is Model Of:
PolylineSimplificationCostFunction.

Public Member Functions

 Squared_distance_cost ()
 Initializes the cost function.
 
template<class CDT >
boost::optional< typename CDT::Geom_traits::FT > operator() (const Constrained_triangulation_plus_2< CDT > &pct, typename Constrained_triangulation_plus_2< CDT >::Vertices_in_constraint_iterator vicq) const
 Given a vertex in constraint iterator vicq computes vicp=std::prev(vicq) and vicr=std::next(vicq),. More...
 

Member Function Documentation

◆ operator()()

template<class CDT >
boost::optional<typename CDT::Geom_traits::FT> CGAL::Polyline_simplification_2::Squared_distance_cost::operator() ( const Constrained_triangulation_plus_2< CDT > &  pct,
typename Constrained_triangulation_plus_2< CDT >::Vertices_in_constraint_iterator  vicq 
) const

Given a vertex in constraint iterator vicq computes vicp=std::prev(vicq) and vicr=std::next(vicq),.

returns the maximum of the square distances between each point along the original subpolyline, between vicp and vicr, and the straight line segment from *vicp->point() to *vicr->point().

Template Parameters
CDTmust be CGAL::Constrained_Delaunay_triangulation_2 with a vertex type that is model of PolylineSimplificationVertexBase_2.