#include <CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_sorting.h>
Sorting of segments with respect to the local line fit quality.
Indices of input segments are sorted with respect to the quality of the least squares line fit applied to the vertices of incident segments of each segment.
Template Parameters
Examples: Shape_detection/region_growing_lines_on_segment_set.cpp .
void sort ()
sorts Items
of input segments.
const Seed_range & ordered ()
returns an instance of Seed_range
to access the ordered Items
of input segments.
◆ Least_squares_line_fit_sorting()
template<typename GeomTraits , typename Item_ , typename NeighborQuery , typename SegmentMap >
template<typename InputRange , typename NamedParameters = parameters::Default_named_parameters>
initializes all internal data structures.
Template Parameters
Parameters
input_range an instance of InputRange
with 2D or 3D segments
neighbor_query an instance of NeighborQuery
that is used internally to access vertex's neighbors
np a sequence of Named Parameters among the ones listed below
Template Parameters
Optional Named Parameters
segment_map
item_map
an instance of a model of ReadablePropertyMap
with InputRange::const_iterator
as key type and Item
as value type.
Default: A default is provided when Item
is InputRange::const_iterator
or its value type.
geom_traits
an instance of GeomTraits
Default: GeomTraits()
Precondition input_range.size() > 0