\( \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 Polygon Partitioning

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
CGAL::Is_y_monotone_2< Traits > Class Template Reference
Function Object Classes

`#include <CGAL/polygon_function_objects.h>`

## Definition

Function object class that tests whether a sequence of points represents a \( y\)-monotone polygon or not.

Is Model Of:
  `PolygonIsValid`

See Also
  `CGAL::convex_partition_is_valid_2()`
  `CGAL::Partition_is_valid_traits_2<Traits, PolygonIsValid>`

Implementation

This test requires \( O(n)\) time for a polygon with \( n\) vertices.

## Creation
| Is_y_monotone_2 (const Traits &t)
| `Traits` is a model of the concept `IsYMonotoneTraits_2`

## Operations
template<class InputIterator >
bool | operator() (InputIterator first, InputIterator beyond)
| returns `true` iff the points of type `Traits::Point_2` in the range [`first`,`beyond`) define a \( y\)-monotone polygon.