ILNumerics Ultimate VS

QuickSortQuickSortAscIDXST Method (UInt16, Int64, Int64, Int64, Int64)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
One dimensional quick sort, inline, ascending, arbitrary element spacing, indices aware.

[ILNumerics Core Module]

Namespace:  ILNumerics.Core.Misc
Assembly:  ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public static void QuickSortAscIDXST(
	ushort* vec,
	long* vecIdx,
	long lo,
	long hi,
	long inc
)

Parameters

vec
Type: SystemUInt16*
data array, 1dim, replaced on output with sorted values
vecIdx
Type: SystemInt64*
indices vector, content will in-place be sorted along with vec
lo
Type: SystemInt64
lowest index of sorting range
hi
Type: SystemInt64
highest index of sorting range
inc
Type: SystemInt64
spacing between elements (dimension specifier)
Remarks

Quick sort algorithm is used for ranges of minimum lengths specified by MminimumQuicksortLength and above. Below that length, a simple insertion sort is used instead.

The algorithm implements a non-recursive quicksort variant. Therefore a small amount of memory is needed to perform the sorting. That 'stack' memory is preserved from the ILMemoryPool. The size is determined by the value of MaxSafeQuicksortRecursionDepth.

Handling of NaN values (for double,float,complex or fcomplex arrays element datatypes only): if the input array contains any NaN values, those elements will be sorted to the end of the array on output.

[ILNumerics Core Module]

See Also

Reference