Class MedianReduction

java.lang.Object
noaa.coastwatch.util.MedianReduction
All Implemented Interfaces:
ArrayReduction

public class MedianReduction extends Object implements ArrayReduction
The MedianReduction reduces an array to a single median value. Note that the median methods have a side effect that the input array is sorted between the specified bounds after the call. To prevent this, pass in a copy of the data array.
Since:
3.5.0
Author:
Peter Hollemans
  • Constructor Details

    • MedianReduction

      public MedianReduction()
  • Method Details

    • reduce

      public byte reduce(byte[] array, int from, int to)
      Specified by:
      reduce in interface ArrayReduction
    • reduce

      public short reduce(short[] array, int from, int to)
      Specified by:
      reduce in interface ArrayReduction
    • reduce

      public int reduce(int[] array, int from, int to)
      Specified by:
      reduce in interface ArrayReduction
    • reduce

      public long reduce(long[] array, int from, int to)
      Specified by:
      reduce in interface ArrayReduction
    • reduce

      public float reduce(float[] array, int from, int to)
      Specified by:
      reduce in interface ArrayReduction
    • reduce

      public double reduce(double[] array, int from, int to)
      Specified by:
      reduce in interface ArrayReduction