CGAL 5.6.1 - Shape Detection
CGAL::Shape_detection::Segment_set::Least_squares_line_fit_sorting< GeomTraits, Item_, NeighborQuery, SegmentMap > Class Template Reference

#include <CGAL/Shape_detection/Region_growing/Segment_set/Least_squares_line_fit_sorting.h>

Definition

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
GeomTraitsa model of Kernel
NeighborQuerya model of NeighborQuery
Item_a descriptor representing a given segment. Must be a model of Hashable.
SegmentMapa model of ReadablePropertyMap whose key type is the value type of the input range and value type is Kernel::Segment_2 or Kernel::Segment_3
Examples:
Shape_detection/region_growing_lines_on_segment_set.cpp.

Types

using Item = Item_
 Item type.
 
using Seed_range = std::vector< Item >
 Seed range.
 

Initialization

template<typename InputRange , typename NamedParameters = parameters::Default_named_parameters>
 Least_squares_line_fit_sorting (const InputRange &input_range, NeighborQuery &neighbor_query, const NamedParameters &np=parameters::default_values())
 initializes all internal data structures. More...
 

Sorting

void sort ()
 sorts Items of input segments.
 

Access

const Seed_rangeordered ()
 returns an instance of Seed_range to access the ordered Items of input segments.
 

Constructor & Destructor Documentation

◆ Least_squares_line_fit_sorting()

template<typename GeomTraits , typename Item_ , typename NeighborQuery , typename SegmentMap >
template<typename InputRange , typename NamedParameters = parameters::Default_named_parameters>
CGAL::Shape_detection::Segment_set::Least_squares_line_fit_sorting< GeomTraits, Item_, NeighborQuery, SegmentMap >::Least_squares_line_fit_sorting ( const InputRange &  input_range,
NeighborQuery neighbor_query,
const NamedParameters &  np = parameters::default_values() 
)

initializes all internal data structures.

Template Parameters
NamedParametersa sequence of Named Parameters
Parameters
input_rangean instance of InputRange with 2D or 3D segments
neighbor_queryan instance of NeighborQuery that is used internally to access vertex's neighbors
npa sequence of Named Parameters among the ones listed below
Template Parameters
InputRangea model of ConstRange whose iterator type is InputIterator
Optional Named Parameters
  • 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.
  • an instance of GeomTraits
  • Default: GeomTraits()
Precondition
input_range.size() > 0