Class ApproximateSort_F32

java.lang.Object
org.ddogleg.sorting.ApproximateSort_F32

public class ApproximateSort_F32 extends Object
Counting sort for floating point numbers. Sorting accuracy will be to within range/numBins.
  • 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

      public void computeRange(SortableParameter_F32[] input, int start, int length)
      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 list
      length - Length of the input list
      indexes - Number of elements
    • sortObject

      public void sortObject(SortableParameter_F32[] input, int start, int length)
      Sorts the input list
      Parameters:
      input - (Input) Data which is to be sorted. Not modified.
      start - First element in input list
      length - Length of the input list