Class NaNTransformers


  • final class NaNTransformers
    extends java.lang.Object
    Support for creating NaNTransformer implementations.
    • Constructor Detail

      • NaNTransformers

        private NaNTransformers()
        No instances.
    • Method Detail

      • createNaNTransformer

        static NaNTransformer createNaNTransformer​(NaNPolicy nanPolicy,
                                                   boolean copy)
        Creates a NaNTransformer based on the nanPolicy and data copy policy.

        The transformer is thread-safe.

        Parameters:
        nanPolicy - NaN policy.
        copy - Set to true to use a copy of the data.
        Returns:
        the transformer
      • copy

        static double[] copy​(double[] data,
                             int from,
                             int to)
        Copy the specified range of data.

        This is a simplification of Arrays#copyOfRange(double[], int, int) and does not support range checks or padding of the original input to a longer output.

        Parameters:
        data - Values.
        from - Inclusive start of the range.
        to - Exclusive end of the range.
        Returns:
        the copy