MergeSortT Class |
This class contains method for performing merge sort using the traditional recursive approach. This class is provided for reference, the iterative approach in SortTT(IListTT) is preferable.
As compared to QuickSortT, merge sort is stable (preserves order of equal elements), but uses more memory (an extra array of the same size). Quick sort is un-stable, but performs in-place sorting.
Namespace: DHI.Mike1D.Generic
The MergeSortT type exposes the following members.
Name | Description | |
---|---|---|
MergeSortT(IListT) |
Creates an instance for sorting
| |
MergeSortT(IListT, IComparerT) |
Creates an instance for sorting
| |
MergeSortT(IListT, ComparisonT) |
Creates an instance for sorting
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Sort |
Sort the entire list
| |
Sort(Int32, Int32) |
Sort list within the provided indices (inclusive)
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |