Class Min

    • Constructor Detail

      • Min

        public Min()
        Create a Min instance.
      • Min

        public Min​(Min original)
            throws org.hipparchus.exception.NullArgumentException
        Copy constructor, creates a new Min identical to the original.
        Parameters:
        original - the Min instance to copy
        Throws:
        org.hipparchus.exception.NullArgumentException - if original is null
    • Method Detail

      • getN

        public long getN()
        Returns the number of values that have been added.
        Specified by:
        getN in interface StorelessUnivariateStatistic
        Returns:
        the number of values.
      • aggregate

        public void aggregate​(Min other)
        Aggregates the provided instance into this instance.

        This method can be used to combine statistics computed over partitions or subsamples - i.e., the value of this instance after this operation should be the same as if a single statistic would have been applied over the combined dataset.

        Specified by:
        aggregate in interface AggregatableStatistic<Min>
        Parameters:
        other - the instance to aggregate into this instance
      • evaluate

        public double evaluate​(double[] values,
                               int begin,
                               int length)
                        throws org.hipparchus.exception.MathIllegalArgumentException
        Returns the minimum of the entries in the specified portion of the input array, or Double.NaN if the designated subarray is empty.

        Throws MathIllegalArgumentException if the array is null or the array index parameters are not valid.

        • The result is NaN iff all values are NaN (i.e. NaN values have no impact on the value of the statistic).
        • If any of the values equals Double.NEGATIVE_INFINITY, the result is Double.NEGATIVE_INFINITY.
        Specified by:
        evaluate in interface org.hipparchus.util.MathArrays.Function
        Specified by:
        evaluate in interface StorelessUnivariateStatistic
        Specified by:
        evaluate in interface UnivariateStatistic
        Parameters:
        values - the input array
        begin - index of the first array element to include
        length - the number of elements to include
        Returns:
        the minimum of the values or Double.NaN if length = 0
        Throws:
        org.hipparchus.exception.MathIllegalArgumentException - if the array is null or the array index parameters are not valid
        See Also:
        UnivariateStatistic.evaluate(double[], int, int)