C# Класс Orc.Sort.NSort.FastQuickSorter

A fast quick sort demonstration algorithm

Author James Gosling, Kevin A. Smith,

Source: http://www.cs.ubc.ca/spider/harrison/Java/FastQSortAlgorithm.java.html

Ported to C# by Jonathand de Halleux

Наследование: SwapSorter
Показать файл Открыть проект

Открытые методы

Метод Описание
FastQuickSorter ( ) : System
FastQuickSorter ( IComparer comparer, ISwap swapper ) : System
Sort ( IList list ) : void

Приватные методы

Метод Описание
InsertionSort ( IList list, int lo0, int hi0 ) : void
QuickSort ( IList list, int l, int r ) : void

This is a generic version of C.A.R Hoare's Quick Sort algorithm. This will handle arrays that are already sorted, and arrays with duplicate keys.

If you think of a one dimensional array as going from the lowest index on the left to the highest index on the right then the parameters to this function are lowest index or left and highest index or right. The first time you call this function it will be with the parameters 0, a.length - 1.

Описание методов

FastQuickSorter() публичный Метод

public FastQuickSorter ( ) : System
Результат System

FastQuickSorter() публичный Метод

public FastQuickSorter ( IComparer comparer, ISwap swapper ) : System
comparer IComparer
swapper ISwap
Результат System

Sort() публичный Метод

public Sort ( IList list ) : void
list IList
Результат void