C5  2.4
The C5 Generic Collection Library for C# and CLI is a comprehensive collection library supporting lists, sets, bags, dictionaries, priority queues, (FIFO) queues, and (LIFO) stacks. C5 runs on .NET 3.5+, Silverlight 5, Windows Phone 8, Xamarin.iOS, Xamarin.Android, and Mono.
C5.Sorting Class Reference

A utility class with functions for sorting arrays with respect to an IComparer<T> More...

Static Public Member Functions

static void IntroSort< T > (T[] array, int start, int count, SCG.IComparer< T > comparer)
 Sort part of array in place using IntroSort More...
 
static void IntroSort< T > (T[] array)
 Sort an array in place using IntroSort and default comparer More...
 
static void InsertionSort< T > (T[] array, int start, int count, SCG.IComparer< T > comparer)
 Sort part of array in place using Insertion Sort More...
 
static void HeapSort< T > (T[] array, int start, int count, SCG.IComparer< T > comparer)
 Sort part of array in place using Heap Sort More...
 

Detailed Description

A utility class with functions for sorting arrays with respect to an IComparer<T>

Member Function Documentation

static void C5.Sorting.HeapSort< T > ( T[]  array,
int  start,
int  count,
SCG.IComparer< T >  comparer 
)
static

Sort part of array in place using Heap Sort

Exceptions
ArgumentOutOfRangeExceptionIf the
start
and
count
arguments does not describe a valid range.
Parameters
arrayArray to sort
startIndex of first position to sort
countNumber of elements to sort
comparerIComparer<T> to sort by
static void C5.Sorting.InsertionSort< T > ( T[]  array,
int  start,
int  count,
SCG.IComparer< T >  comparer 
)
static

Sort part of array in place using Insertion Sort

Exceptions
ArgumentOutOfRangeExceptionIf the
start
and
count
arguments does not describe a valid range.
Parameters
arrayArray to sort
startIndex of first position to sort
countNumber of elements to sort
comparerIComparer<T> to sort by
static void C5.Sorting.IntroSort< T > ( T[]  array,
int  start,
int  count,
SCG.IComparer< T >  comparer 
)
static

Sort part of array in place using IntroSort

Exceptions
ArgumentOutOfRangeExceptionIf the
start
and
count
arguments does not describe a valid range.
Parameters
arrayArray to sort
startIndex of first position to sort
countNumber of elements to sort
comparerIComparer<T> to sort by
static void C5.Sorting.IntroSort< T > ( T[]  array)
static

Sort an array in place using IntroSort and default comparer

Exceptions
NotComparableExceptionIf T is not comparable
Parameters
arrayArray to sort

The documentation for this class was generated from the following file: