Package org.ddogleg.sorting
Class QuickSortObj_F32
java.lang.Object
org.ddogleg.sorting.QuickSortObj_F32
An implementation of the quick sort algorithm from Numerical Recipes Third Edition
that is specified for arrays of floats.
A small amount of memory is declared for this sorting algorithm.
This implementation seems to often perform slower than Shell sort. A comment in Numerical
recipes about unnecessary array checks makes me think this is slow because java always
does a bounds check on arrays.
This has slightly better performance than Arrays.sort(float[]). Not noticeable in most applications.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
sort
(SortableParameter_F32[] arr, int length) void
sort
(SortableParameter_F32[] arr, int length, int[] indexes)
-
Constructor Details
-
QuickSortObj_F32
public QuickSortObj_F32() -
QuickSortObj_F32
public QuickSortObj_F32(int NSTACK, int M)
-
-
Method Details
-
sort
-
sort
-