|
Template Numerical Library version\ main:4e6e2c1
|
This page provides an overview of all sort functions available for segment operations, helping to understand the differences between variants and choose the right function for your needs.
The segment sort functions are organized into the following categories:
These functions sort elements within segments:
| Function | Segments Sorted | Description |
|---|---|---|
| Segments_sortAllSegments | All segments | Sorts all segments in the container |
| Segments_sortSegments_range (range) | Segments [begin, end) | Sorts segments in a specified range |
| Segments_sortSegments_with_segment_indices (array) | Segments in array | Sorts only segments whose indices are in the provided array |
When to use:
These functions add a segment-level condition, sorting only segments that satisfy the condition:
| Function | Segments Sorted | Description |
|---|---|---|
| Segments_sortAllSegmentsIf | All segments matching condition | Sorts all segments that satisfy the segment condition |
| Segments_sortSegmentsIf_range | Segments [begin, end) matching condition | Sorts segments in range that satisfy the segment condition |
When to use:
The function Segments_segmentInsertionSort sorts a single segment view using insertion sort.
When to use:
The sorting order is determined by the comparison function (see Compare Lambda).
All sort functions share these common parameters:
Conditional variants additionally require: