The concept SnapRoundingTraits_2 lists the set of requirements that must be fulfilled by an instance of the Traits templateparameter of the function snap_rounding_2<Traits,InputIterator,OutputContainer>(). This concept provides the types of the geometric primitives used in this class and some function object types for the required predicates on those primitives.
 
The number type. This type must fulfill the requirements on
FieldNumberType
 
 
The point type.
 
 
The segment type.
 
 
The isorectangle type.
 
 
Function object. Must provide the operator
Point_2 operator()(Segment_2 seg, int i), which returns the source or
target of seg. If i modulo 2 is 0, the source is returned,
otherwise the target is returned.
 
 
Function object. Must provide the operator
Segment_2 operator()(Point_2 p, Point_2 q), which introduces a segment
with source p and target q. The segment is directed from the
source towards the target.
 
 
Function object. Must provide the
operator
Iso_rectangle_2 operator()(Point_2 left, Point_2 right, Point_2 bottom, Point_2 top), which introduces an isooriented rectangle fo whose minimal
$$x coordinate is the one of left, the maximal $$x coordinate is the one
of right, the minimal $$y coordinate is the one of bottom, the
maximal $$y coordinate is the one of top.
 
 
Function object. Must provide the operator
double operator()(FT), which computes an approximation of a given number
of type FT. The precision of this operation is of not high significance,
as it is only used in the implementation of the heuristic technique to exploit
a cluster of kdtrees rather than just one.
 
 
Function object. Must provide the operator
Comparison_result operator()(Point_2 p, Point_2 q)
which returns
SMALLER, EQUAL or LARGER according to the
$$xordering of points p and q.
 
 
Function object. Must provide the operator
Comparison_result operator()(Point_2 p, Point_2 q)
which returns
SMALLER, EQUAL or LARGER
according to the
$$yordering of points p and q.
 
 
Rounds a point to a center of a pixel (unit square)
in the grid used by the Snap Rounding algorithm. Note that no conversion
to an integer grid is done yet. Must have the syntax
void operator()(Point_2 p,FT pixel_size,FT &x,FT &y) where $$p is the
input point, pixel_size is the size of the pixel of the grid,
and $$x and $$y are the $$x and $$ycoordinates of the rounded point
respectively.
 
 
Convert coordinates
into an integer representation where one unit is equal to pixel size.
For instance, if a point has the coordinates $$(3.7,5.3) and the pixel
size is $$0.5, then the new point will have the coordinates of $$(7,10).
Note, however, that the number type remains the same here, although
integers are represented.
Must have the syntax Point_2 operator()(Point_2 p,NT pixel_size)
where $$p is the converted point and pixel_size is the size of the pixel
of the grid.
 
 
Returns the vertices of a polygon,
which is the Minkowski sum of a segment and a square centered at the origin
with edge size pixel edge.
Must have the syntax
void operator()(std::list<Point_2>& vertices_list, Segment_2 s, NT unit_square)
where vertices_list is the list of the vertices of the Minkowski sum
polygon, $$s is the input segment and unit_square is the edge size of
the pixel.

The following functions construct the required function objects occasionally referred as functors listed above.