CGAL 5.6.1 - Shape Detection
CGAL::Shape_detection::Point_set::Least_squares_circle_fit_sorting< GeomTraits, Item_, NeighborQuery, PointMap > Class Template Reference

#include <CGAL/Shape_detection/Region_growing/Point_set/Least_squares_circle_fit_sorting.h>


Sorting of 2D points with respect to the local circle fit quality.

Indices of 2D input points are sorted with respect to the quality of the least squares circle fit applied to the neighboring points of each point.

Template Parameters
GeomTraitsa model of Kernel
Item_a descriptor representing a given point. Must be a model of Hashable.
NeighborQuerya model of NeighborQuery
PointMapa model of ReadablePropertyMap whose key type is the value type of the input range and value type is Kernel::Point_2

Related Functions

(Note that these are not member functions.)

template<class PointSet3 , class NeighborQuery >
using Least_squares_circle_fit_sorting_for_point_set = Least_squares_circle_fit_sorting< typename Kernel_traits< typename PointSet3::Point_3 >::Kernel, typename PointSet3::Index, NeighborQuery, typename PointSet3::Point_map >
 shortcut to ease the definition of the class when using CGAL::Point_set_3. More...
template<class PointSet3 , class NeighborQuery , typename NamedParameters = CGAL::parameters::Default_named_parameters>
Least_squares_circle_fit_sorting_for_point_set< PointSet3, NeighborQuerymake_least_squares_circle_fit_sorting (const PointSet3 &ps, NeighborQuery &neighbor_query, const NamedParameters np=parameters::default_values())
 returns an instance of the sorting class to be used with CGAL::Point_set_3, with point and normal maps added to np.


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


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


void sort ()
 sorts Items of input points.


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

Constructor & Destructor Documentation

◆ Least_squares_circle_fit_sorting()

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

initializes all internal data structures.

Template Parameters
InputRangea model of ConstRange whose iterator type is RandomAccessIterator
NamedParametersa sequence of Named Parameters
input_rangean instance of InputRange with 2D points
neighbor_queryan instance of NeighborQuery that is used internally to access point's neighbors
npa sequence of Named Parameters among the ones listed below
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 PointMap that maps an item to Kernel::Point_2
  • Default: PointMap()
  • an instance of GeomTraits
  • Default: GeomTraits()
input_range.size() > 0