Package elki.math

Class MeanVarianceMinMax

  • Direct Known Subclasses:
    StatisticalMoments

    public class MeanVarianceMinMax
    extends MeanVariance
    Class collecting mean, variance, minimum and maximum statistics.
    Since:
    0.5.0
    Author:
    Erich Schubert
    • Field Detail

      • min

        double min
        Minimum value
      • max

        double max
        Maximum value
    • Constructor Detail

      • MeanVarianceMinMax

        public MeanVarianceMinMax()
        Constructor.
      • MeanVarianceMinMax

        public MeanVarianceMinMax​(MeanVarianceMinMax other)
        Constructor cloning existing statistics.
        Parameters:
        other - Existing statistics
    • Method Detail

      • put

        public void put​(double val)
        Description copied from class: MeanVariance
        Add a single value with weight 1.0
        Overrides:
        put in class MeanVariance
        Parameters:
        val - Value
      • put

        public void put​(double val,
                        double weight)
        Description copied from class: MeanVariance
        Add data with a given weight.
        Overrides:
        put in class MeanVariance
        Parameters:
        val - data
        weight - weight
      • put

        public void put​(Mean other)
        Description copied from class: MeanVariance
        Join the data of another MeanVariance instance.
        Overrides:
        put in class MeanVariance
        Parameters:
        other - Data to join with
      • put

        public MeanVariance put​(double[] vals,
                                double[] weights)
        Description copied from class: Mean
        Add values with weight 1.0
        Overrides:
        put in class MeanVariance
        Parameters:
        vals - Values
        Returns:
        this
      • getMin

        public double getMin()
        Get the current minimum.
        Returns:
        current minimum.
      • getMax

        public double getMax()
        Get the current maximum.
        Returns:
        current maximum.
      • getDoubleMinMax

        public DoubleMinMax getDoubleMinMax()
        Get the current minimum and maximum.
        Returns:
        current minimum and maximum
      • getDiff

        public double getDiff()
        Return the difference between minimum and maximum.
        Returns:
        Difference of current Minimum and Maximum.
      • newArray

        public static MeanVarianceMinMax[] newArray​(int dimensionality)
        Create and initialize a new array of MeanVarianceMinMax
        Parameters:
        dimensionality - Dimensionality
        Returns:
        New and initialized Array