## IsYMonotoneTraits_2

### Definition

Requirements of a traits class to be used with the function is_y_monotone_2 that tests whether a sequence of 2D points defines a y-monotone polygon or not.

### Types

The following two types are required:

IsYMonotoneTraits_2::Point_2
| The point type of the polygon vertices.
IsYMonotoneTraits_2::Less_yx_2
| Predicate object type that compares Point_2s lexicographically. Must provide bool operator()(Point_2 p, Point_2 q) where true is returned iff p <xy q. We have p<xyq, iff px < qx or px = qx and py < qy, where px and py denote x and y coordinate of point p resp.

### Creation

Only a copy constructor is required.

IsYMonotoneTraits_2 traits ( & tr);

### Operations

The following function that creates an instance of the above predicate object type must exist:

Less_yx_2 | traits.less_yx_2_object ()

### Has Models

CGAL::Partition_traits_2<R>
CGAL::Kernel_traits_2

### See Also

CGAL::Is_y_monotone_2<Traits>
CGAL::y_monotone_partition_2
CGAL::y_monotone_partition_is_valid_2