Extension methods for IList<>s.
More...
|
static void | InsertionSort< T > (this IList< T > ts) |
| Sorts the specified list using an insertion sort algorithm and the default sort comparer for T. More...
|
|
static void | InsertionSort< T > (this IList< T > ts, IComparer< T > comparer) |
| Sorts the specified list using an insertion sort algorithm and the specified comparer. More...
|
|
static void | InsertionSort< T > (this IList< T > ts, Comparison< T > comparison) |
| Sorts the specified list using an insertion sort algorithm and the specified comparison. More...
|
|
static Option< T > | Random< T > (this IList< T > list) |
| If the specified list is empty, returns an empty option; otherwise, returns an option containing a random element from the specified list. More...
|
|
static void | Shuffle< T > (this IList< T > ts) |
| Shuffles the element order of the specified list. More...
|
|
Extension methods for IList<>s.
static void Smooth.Collections.IListExtensions.InsertionSort< T > |
( |
this IList< T > |
ts | ) |
|
|
inlinestatic |
Sorts the specified list using an insertion sort algorithm and the default sort comparer for T.
Insertion sort is a O(n²) time complexity algorithm and should not be used on arbitrary lists. However, it has a best case time complexity of O(n) for lists that are already sorted and is quite fast when used on nearly sorted input.
static void Smooth.Collections.IListExtensions.InsertionSort< T > |
( |
this IList< T > |
ts, |
|
|
IComparer< T > |
comparer |
|
) |
| |
|
inlinestatic |
Sorts the specified list using an insertion sort algorithm and the specified comparer.
Insertion sort is a O(n²) time complexity algorithm and should not be used on arbitrary lists. However, it has a best case time complexity of O(n) for lists that are already sorted and is quite fast when used on nearly sorted input.
static void Smooth.Collections.IListExtensions.InsertionSort< T > |
( |
this IList< T > |
ts, |
|
|
Comparison< T > |
comparison |
|
) |
| |
|
inlinestatic |
Sorts the specified list using an insertion sort algorithm and the specified comparison.
Insertion sort is a O(n²) time complexity algorithm and should not be used on arbitrary lists. However, it has a best case time complexity of O(n) for lists that are already sorted and is quite fast when used on nearly sorted input.
If the specified list is empty, returns an empty option; otherwise, returns an option containing a random element from the specified list.
static void Smooth.Collections.IListExtensions.Shuffle< T > |
( |
this IList< T > |
ts | ) |
|
|
inlinestatic |
Shuffles the element order of the specified list.
The documentation for this class was generated from the following file: