Method IntroSort
IntroSort<T>(T[], Int32, Int32, IComparer<T>)
Sorts the given array slice using the
Declaration
public static void IntroSort<T>(T[] a, int fromIndex, int toIndex, IComparer<T> comp)
Parameters
Type | Name | Description |
---|---|---|
T[] | a | |
System.Int32 | fromIndex | Start index (inclusive) |
System.Int32 | toIndex | End index (exclusive) |
IComparer<T> | comp |
Type Parameters
Name | Description |
---|---|
T |
IntroSort<T>(T[], IComparer<T>)
Sorts the given array using the
Declaration
public static void IntroSort<T>(T[] a, IComparer<T> comp)
Parameters
Type | Name | Description |
---|---|---|
T[] | a | |
IComparer<T> | comp |
Type Parameters
Name | Description |
---|---|
T |
IntroSort<T>(T[], Int32, Int32)
Sorts the given array slice in natural order. This method uses the intro sort algorithm, but falls back to insertion sort for small arrays.
Declaration
public static void IntroSort<T>(T[] a, int fromIndex, int toIndex)
Parameters
Type | Name | Description |
---|---|---|
T[] | a | |
System.Int32 | fromIndex | Start index (inclusive) |
System.Int32 | toIndex | End index (exclusive) |
Type Parameters
Name | Description |
---|---|
T |
IntroSort<T>(T[])
Sorts the given array in natural order. This method uses the intro sort algorithm, but falls back to insertion sort for small arrays.
Declaration
public static void IntroSort<T>(T[] a)
Parameters
Type | Name | Description |
---|---|---|
T[] | a |
Type Parameters
Name | Description |
---|---|
T |