Namespaces

Types in MathNet.Numerics

Type Sorting

Namespace MathNet.Numerics

Sorting algorithms for single, tuple and triple lists.

Static Functions

Public Static Functions

void Sort<T>(IList<T> keys, IComparer<T> comparer)

Sort a list of keys, in place using the quick sort algorithm using the quick sort algorithm.
Parameters
IList<T> keys

List to sort.

IComparer<T> comparer

Comparison, defining the sort order.

void Sort<T>(IList<T> keys, int index, int count, IComparer<T> comparer)

Sort a range of a list of keys, in place using the quick sort algorithm.
Parameters
IList<T> keys

List to sort.

int index

The zero-based starting index of the range to sort.

int count

The length of the range to sort.

IComparer<T> comparer

Comparison, defining the sort order.

void Sort<TKey, TItem>(IList<TKey> keys, IList<TItem> items, IComparer<TKey> comparer)

Sort a list of keys and items with respect to the keys, in place using the quick sort algorithm.
Parameters
IList<TKey> keys

List to sort.

IList<TItem> items

List to permute the same way as the key list.

IComparer<TKey> comparer

Comparison, defining the sort order.

void Sort<TKey, TItem>(IList<TKey> keys, IList<TItem> items, int index, int count, IComparer<TKey> comparer)

Sort a list of keys and items with respect to the keys, in place using the quick sort algorithm.
Parameters
IList<TKey> keys

List to sort.

IList<TItem> items

List to permute the same way as the key list.

int index

The zero-based starting index of the range to sort.

int count

The length of the range to sort.

IComparer<TKey> comparer

Comparison, defining the sort order.

void Sort<TKey, TItem1, TItem2>(IList<TKey> keys, IList<TItem1> items1, IList<TItem2> items2, IComparer<TKey> comparer)

Sort a list of keys, items1 and items2 with respect to the keys, in place using the quick sort algorithm.
Parameters
IList<TKey> keys

List to sort.

IList<TItem1> items1

First list to permute the same way as the key list.

IList<TItem2> items2

Second list to permute the same way as the key list.

IComparer<TKey> comparer

Comparison, defining the sort order.

void Sort<TKey, TItem1, TItem2>(IList<TKey> keys, IList<TItem1> items1, IList<TItem2> items2, int index, int count, IComparer<TKey> comparer)

Sort a list of keys, items1 and items2 with respect to the keys, in place using the quick sort algorithm.
Parameters
IList<TKey> keys

List to sort.

IList<TItem1> items1

First list to permute the same way as the key list.

IList<TItem2> items2

Second list to permute the same way as the key list.

int index

The zero-based starting index of the range to sort.

int count

The length of the range to sort.

IComparer<TKey> comparer

Comparison, defining the sort order.

void SortAll<T1, T2>(IList<T1> primary, IList<T2> secondary, IComparer<T1> primaryComparer, IComparer<T2> secondaryComparer)

Sort a list of keys and items with respect to the keys, in place using the quick sort algorithm.
Parameters
IList<T1> primary

List to sort.

IList<T2> secondary

List to sort on duplicate primary items, and permute the same way as the key list.

IComparer<T1> primaryComparer

Comparison, defining the primary sort order.

IComparer<T2> secondaryComparer

Comparison, defining the secondary sort order.