CGAL 6.0.2 - Shape Detection

Loading...
Searching...
No Matches
List of all members
CGAL::Shape_detection::Segment_set::Least_squares_line_fit_sorting< GeomTraits, Item_, NeighborQuery, SegmentMap > Class Template Reference
Shape Detection Reference » Region Growing » Segment Set

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

## Definition

template<typename GeomTraits, typename Item_, typename NeighborQuery, typename SegmentMap>
class CGAL::Shape_detection::Segment_set::Least_squares_line_fit_sorting< GeomTraits, Item_, NeighborQuery, SegmentMap >

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

  GeomTraits | a model of `Kernel`
  NeighborQuery | a model of `NeighborQuery`
  Item_ | a descriptor representing a given segment. Must be a model of `Hashable`.
  SegmentMap | a 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.

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

## Access
const Seed_range & | ordered ()
| 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

  NamedParameters | a sequence of Named 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

  InputRange | a model of `ConstRange` whose iterator type is `InputIterator`

Optional Named Parameters

  an instance of `SegmentMap` that maps the `Item` of a segment to `Kernel::Segment_2` or `Kernel::Segment_3` Default: `SegmentMap()` |
  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`