Function

CGAL::compute_subcurves

#include <CGAL/Sweep_line_2_algorithms.h>

template <class InputIterator, class OutputIterator, class Traits>
OutputIterator
compute_subcurves ( InputIterator curves_begin,
InputIterator curves_end,
OutputIterator subcurves,
bool multiple_overlaps = false,
Traits traits = Default_traits())
given a range of curves, compute all x-monotone subcurves that are pairwise disjoint in their interior, as induced by the input curves. If the flag multiple_overlaps is true, then a subcurve that represents an overlap of k input curves is reported k times; otherwise, each subcurve is reported only once. The Traits type must be a model of the ArrangementTraits_2 concept, such that the value-type of InputIterator is Traits::Curve_2, and the value-type of OutputIterator is Traits::X_monotone_curve_2.