AlgorithmUtil
Description
Helper class that provides some commonly used algorithms for element sequences.
Algorithms that use IComparable or IEquatable are provided in three variants, where each variant is identified by the name suffix:
-
*Default
:
The algorithm uses a generic delegate to operate on the elements, which may cause virtual calls or boxing at runtime. -
*Object
:
The algorithm makes null-safe use of the natural semantic of the element objects, which may cause virtual calls at runtime. Special overloads exist for the string type, which make use of StringUtil.Compare, in order to provide the same behaviour (independently of platform, culture, etc.). -
*Value
:
The algorithm makes direct use of the natural semantic of the element values.
Public / Methods
SearchBinaryObject
2 overloads
Runs a binary search for value in in the given array.
- See also
Runs a binary search for value in in the given array.
- See also
SearchLinearDefault
Finds the smallest index of the array element that is equal to the given value, according to equals opt.
- See also
SearchLinearObject
Finds the smallest index of the array element that is equal to the given value.
- See also
SearchLinearValue
Finds the smallest index of the array element that is equal to the given value.
- See also
Shuffle
2 overloads
Shuffles the elements of the given array randomly.
Shuffles the elements of the given list randomly.
SortArrayDefault
Sorts the given array range.
The method uses an unstable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
- See also
SortArrayObject
2 overloads
Sorts the given array range.
The method uses an unstable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
- See also
Sorts the given array range.
The method uses an unstable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
- See also
SortArrayValue
Sorts the given array range.
The method uses an unstable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
- See also
SortIndexArrayDefault
Sorts the given array range.
The method uses a stable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
- See also
SortIndexArrayObject
2 overloads
Sorts the given array range.
The method uses a stable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
- See also
Sorts the given array range.
The method uses a stable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
- See also
SortIndexArrayValue
Sorts the given array range.
The method uses a stable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
- See also
SortListDefault
Sorts the given list range.
The method uses an unstable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
- See also
SortListObject
2 overloads
Sorts the given list range.
The method uses an unstable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
- See also
Sorts the given list range.
The method uses an unstable hybrid quicksort (median-3 pivot) / insertion sort algorithm.
- See also