Class NaNTransformers.ExcludeNaNTransformer
java.lang.Object
org.apache.commons.statistics.descriptive.NaNTransformers.ExcludeNaNTransformer
- All Implemented Interfaces:
NaNTransformer
- Enclosing class:
NaNTransformers
private static final class NaNTransformers.ExcludeNaNTransformer
extends Object
implements NaNTransformer
A transformer that moves
NaN
to the upper end of the array.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
Set totrue
to use a copy of the data. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
apply
(double[] data, int[] bounds) Pre-process the data for partitioning.
-
Field Details
-
copy
private final boolean copySet totrue
to use a copy of the data.
-
-
Constructor Details
-
ExcludeNaNTransformer
ExcludeNaNTransformer(boolean copy) - Parameters:
copy
- Set totrue
to use a copy of the data.
-
-
Method Details
-
apply
public double[] apply(double[] data, int[] bounds) Description copied from interface:NaNTransformer
Pre-process the data for partitioning.This method will scan all the data and apply processing to
NaN
values.The method will return:
- An array to partition; this may be a copy.
- The
size
of the data; this can be smaller than the input array length if the transformer is configured to exclude NaN values.
- Specified by:
apply
in interfaceNaNTransformer
- Parameters:
data
- Data.bounds
- [size].- Returns:
- pre-processed data (may be a copy)
-