CGAL 6.1 - Shape Detection

Loading...
Searching...
No Matches
List of all members | Related Functions
CGAL::Shape_detection::Point_set::Least_squares_circle_fit_sorting< GeomTraits, Item_, NeighborQuery, PointMap > Class Template Reference
Reference Manual » Region Growing » Point Set

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

## Definition

template<typename GeomTraits, typename Item_, typename NeighborQuery, typename PointMap>
class CGAL::Shape_detection::Point_set::Least_squares_circle_fit_sorting< GeomTraits, Item_, NeighborQuery, PointMap >

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

  GeomTraits | a model of `Kernel`
  Item_ | a descriptor representing a given point. Must be a model of `Hashable`.
  NeighborQuery | a model of `NeighborQuery`
  PointMap | a 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`.
template<class PointSet3 , class NeighborQuery , typename NamedParameters = CGAL::parameters::Default_named_parameters>
Least_squares_circle_fit_sorting_for_point_set< PointSet3, NeighborQuery > | make_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`.

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

## Initialization
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.

## Sorting
void | sort ()
| sorts `Items` of input points.

## Access
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

  InputRange | a model of `ConstRange` whose iterator type is `RandomAccessIterator`
  NamedParameters | a sequence of Named Parameters

Parameters

  input_range | an instance of `InputRange` with 2D points
  neighbor_query | an instance of `NeighborQuery` that is used internally to access point's neighbors
  np | a 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()` |

Precondition
  `input_range.size() > 0`