Sorting algorithms/Quicksort: Difference between revisions
Content deleted Content added
m Reapplied prior datatype update. |
|||
Line 1,789: | Line 1,789: | ||
public class QuickSort<T> where T : IComparable { |
public class QuickSort<T> where T : IComparable { |
||
#region Constants |
#region Constants |
||
public const |
public const UInt32 INSERTION_LIMIT_DEFAULT = 12; |
||
private const Int32 SAMPLES_MAX = 19; |
private const Int32 SAMPLES_MAX = 19; |
||
#endregion |
#endregion |
||
#region Properties |
#region Properties |
||
public |
public UInt32 InsertionLimit { get; } |
||
private T[] Samples { get; } |
private T[] Samples { get; } |
||
private Int32 Left { get; set; } |
private Int32 Left { get; set; } |
||
Line 1,803: | Line 1,803: | ||
#region Constructors |
#region Constructors |
||
public QuickSort( |
public QuickSort(UInt32 insertionLimit = INSERTION_LIMIT_DEFAULT) { |
||
this.InsertionLimit = insertionLimit; |
this.InsertionLimit = insertionLimit; |
||
this.Samples = new T[SAMPLES_MAX]; |
this.Samples = new T[SAMPLES_MAX]; |