SortIndices
Sorts a span of indices by comparing a read-only span of values of type T, using a custom comparer.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
SortIndices<T, U>(Span<int>, ReadOnlySpan<T>, T)
Sorts a span of indices by comparing a read-only span of values of type T, using a custom comparer.
public static void SortIndices<T, U>(this Span<int> indices, ReadOnlySpan<T> values, U comp) where T : unmanaged, IComparable<T> where U : unmanaged, IComparer<T>
Parameters
Indices to sort. Indices must be unique, nonnegative, and strictly less than the length of values.
Values to use for sorting.
SortIndices<T>(Span<int>, ReadOnlySpan<T>)
Sorts a span of indices by comparing a read-only span of values of type T, using a custom comparer.
public static void SortIndices<T>(this Span<int> indices, ReadOnlySpan<T> values) where T : unmanaged, IComparable<T>
Parameters
Indices to sort. Indices must be unique, nonnegative, and strictly less than the length of values.
Values to use for sorting.