SliceOnComparableSliceExtension<T extends Comparable<T> > extension
- on
-
- Slice<
T>
- Slice<
Methods
-
binarySearch(
T x) → Result< int, int> -
Available on Slice<
Binary searches this slice for a given element. If the slice is not sorted, the returned result is unspecified and meaningless.T> , provided by the SliceOnComparableSliceExtension extension -
isSorted(
) → bool -
Available on Slice<
Checks if the elements of this slice are sorted. That is, for each element a and its following element b, a <= b must hold.T> , provided by the SliceOnComparableSliceExtension extension -
partitionDedup(
) → (Slice< T> , Slice<T> ) -
Available on Slice<
Moves all consecutive repeated elements to the end of the slice according to Comparable. Returns two slices. The first contains no consecutive repeated elements. The second contains all the duplicates in no specified order. If the slice is sorted, the first returned slice contains no duplicates.T> , provided by the SliceOnComparableSliceExtension extension -
sortUnstable(
) → void -
Available on Slice<
Sorts the slice, but might not preserve the order of equal elements.T> , provided by the SliceOnComparableSliceExtension extension