CGAL 6.2 - Shape Detection: CGAL::Shape_detection::Segment_set::Segment_length_sorting< GeomTraits, Item_, SegmentMap > Class Template Reference

CGAL 6.2 - Shape Detection

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

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

## Definition

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

Sorting of segments with respect to their length.

`Items` of segments are sorted in decreasing length.

Template Parameters

  GeomTraits | a model of `Kernel`
  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 `GeomTraits::Segment_2` or `GeomTraits::Segment_3`

Examples
  Shape_detection/region_growing_lines_on_segment_set.cpp.

## Types
using | Segment_map = SegmentMap
using | Segment_type = typename boost::property_traits< Segment_map >::value_type
using | Item = Item_
| Item type.
using | Seed_range = std::vector< Item >
| Seed range.

## Initialization
template<typename InputRange , typename NamedParameters = parameters::Default_named_parameters>
| Segment_length_sorting (const InputRange &input_range, const NamedParameters &np=parameters::default_values())
| initializes all internal data structures.
template<typename InputRange , typename Dummy , typename NamedParameters = parameters::Default_named_parameters, std::enable_if_t< std::is_same< Item, typename Dummy::Item >::value, bool > = true>
| Segment_length_sorting (const InputRange &input_range, const Dummy &, 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

## ◆ Segment_length_sorting() [1/2]

template<typename GeomTraits , typename Item_ , typename SegmentMap >
template<typename InputRange , typename NamedParameters = parameters::Default_named_parameters>

CGAL::Shape_detection::Segment_set::Segment_length_sorting< GeomTraits, Item_, SegmentMap >::Segment_length_sorting | ( | const InputRange & | input_range,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

initializes all internal data structures.

Template Parameters

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

Parameters

  input_range | an instance of `InputRange` with 2D or 3D segments
  np | a sequence of Named Parameters among the ones listed below

Optional Named Parameters

  an instance of `SegmentMap` that maps the `Item` of a segment to `GeomTraits::Segment_2` or `GeomTraits::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`

## ◆ Segment_length_sorting() [2/2]

template<typename GeomTraits , typename Item_ , typename SegmentMap >
template<typename InputRange , typename Dummy , typename NamedParameters = parameters::Default_named_parameters, std::enable_if_t< std::is_same< Item, typename Dummy::Item >::value, bool > = true>

CGAL::Shape_detection::Segment_set::Segment_length_sorting< GeomTraits, Item_, SegmentMap >::Segment_length_sorting | ( | const InputRange & | input_range,
|  | const Dummy & | ,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

initializes all internal data structures.

Three-parameter constructor with a dummy parameter provided for compatibility with other sorting types.

Template Parameters

  InputRange | a model of `ConstRange` whose iterator type is `InputIterator`
  Dummy | Dummy parameter that matches NeighborQuery in other sorting classes. Is not used.
  NamedParameters | a sequence of Named Parameters

Parameters

  input_range | an instance of `InputRange` with 2D or 3D segments
  np | a sequence of Named Parameters among the ones listed below

Optional Named Parameters

  an instance of `SegmentMap` that maps the `Item` of a segment to `GeomTraits::Segment_2` or `GeomTraits::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`