Package org.apache.datasketches.quantilescommon

# Class IncludeMinMax

java.lang.Object
org.apache.datasketches.quantilescommon.IncludeMinMax

public class IncludeMinMax extends Object
This class reinserts the min and max values into the sorted view arrays as required.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`IncludeMinMax.DoublesPair`
A simple structure to hold a pair of arrays
`static class`
`IncludeMinMax.FloatsPair`
A simple structure to hold a pair of arrays
`static class`
`IncludeMinMax.ItemsPair<T>`
A simple structure to hold a pair of arrays
`static class`
`IncludeMinMax.LongsPair`
A simple structure to hold a pair of arrays

## Constructor Summary

Constructors
Constructor
Description
`IncludeMinMax()`

## Method Summary

Modifier and Type
Method
Description
`static IncludeMinMax.DoublesPair`
`includeDoublesMinMax(double[] quantilesIn, long[] cumWeightsIn, double maxItem, double minItem)`
The logic to include the min and max of type double.
`static IncludeMinMax.FloatsPair`
`includeFloatsMinMax(float[] quantilesIn, long[] cumWeightsIn, float maxItem, float minItem)`
The logic to include the min and max of type float.
`static <T> IncludeMinMax.ItemsPair<T>`
`includeItemsMinMax(T[] quantilesIn, long[] cumWeightsIn, T maxItem, T minItem, Comparator<? super T> comparator)`
The logic to include the min and max of type T.
`static IncludeMinMax.LongsPair`
`includeLongsMinMax(long[] quantilesIn, long[] cumWeightsIn, long maxItem, long minItem)`
The logic to include the min and max of type double.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### IncludeMinMax

public IncludeMinMax()

## Method Details

### includeDoublesMinMax

public static IncludeMinMax.DoublesPair includeDoublesMinMax(double[] quantilesIn, long[] cumWeightsIn, double maxItem, double minItem)
The logic to include the min and max of type double.

Parameters:
  `quantilesIn` - The array of quantiles
  `cumWeightsIn` - The array of associated cumulative weights
  `maxItem` - the maximum item of the stream
  `minItem` - the minimum item of the stream
Returns:
  a DoublesPair

### includeLongsMinMax

public static IncludeMinMax.LongsPair includeLongsMinMax(long[] quantilesIn, long[] cumWeightsIn, long maxItem, long minItem)
The logic to include the min and max of type double.

Parameters:
  `quantilesIn` - The array of quantiles
  `cumWeightsIn` - The array of associated cumulative weights
  `maxItem` - the maximum item of the stream
  `minItem` - the minimum item of the stream
Returns:
  a DoublesPair

### includeFloatsMinMax

public static IncludeMinMax.FloatsPair includeFloatsMinMax(float[] quantilesIn, long[] cumWeightsIn, float maxItem, float minItem)
The logic to include the min and max of type float.

Parameters:
  `quantilesIn` - The array of quantiles
  `cumWeightsIn` - The array of associated cumulative weights
  `maxItem` - the maximum item of the stream
  `minItem` - the minimum item of the stream
Returns:
  a FloatsPair

### includeItemsMinMax

public static <T> IncludeMinMax.ItemsPair<T> includeItemsMinMax(T[] quantilesIn, long[] cumWeightsIn, T maxItem, T minItem, Comparator<? super T> comparator)
The logic to include the min and max of type T.

Type Parameters:
  `T` - the item class type
Parameters:
  `quantilesIn` - The array of quantiles
  `cumWeightsIn` - The array of associated cumulative weights
  `maxItem` - the maximum item of the stream
  `minItem` - the minimum item of the stream
  `comparator` - a comparator for type T
Returns:
  an ItemsPair