Package org.ddogleg.sorting
Class ApproximateSort_F32
java.lang.Object
org.ddogleg.sorting.ApproximateSort_F32
Counting sort for floating point numbers. Sorting accuracy will be to within range/numBins.
-
Constructor Summary
ConstructorDescriptionApproximateSort_F32
(int numBins) ApproximateSort_F32
(int minValue, int maxValue, int numBins) -
Method Summary
Modifier and TypeMethodDescriptionvoid
computeRange
(float[] input, int start, int length) Examines the list and computes the range from itvoid
computeRange
(SortableParameter_F32[] input, int start, int length) Examines the list and computes the range from itvoid
setRange
(float minValue, float maxValue) Specify the data rangevoid
sortIndex
(float[] input, int start, int length, int[] indexes) Sort routine which does not modify the input array and instead maintains a list of indexes.void
sortObject
(SortableParameter_F32[] input, int start, int length) Sorts the input list
-
Constructor Details
-
ApproximateSort_F32
public ApproximateSort_F32(int numBins) -
ApproximateSort_F32
public ApproximateSort_F32(int minValue, int maxValue, int numBins)
-
-
Method Details
-
setRange
public void setRange(float minValue, float maxValue) Specify the data range- Parameters:
minValue
- Minimum allowed value. (inclusive)maxValue
- Maximum allowed value. (inclusive)
-
computeRange
public void computeRange(float[] input, int start, int length) Examines the list and computes the range from it -
computeRange
Examines the list and computes the range from it -
sortIndex
public void sortIndex(float[] input, int start, int length, int[] indexes) Sort routine which does not modify the input array and instead maintains a list of indexes.- Parameters:
input
- (Input) Data which is to be sorted. Not modified.start
- First element in input listlength
- Length of the input listindexes
- Number of elements
-
sortObject
Sorts the input list- Parameters:
input
- (Input) Data which is to be sorted. Not modified.start
- First element in input listlength
- Length of the input list
-