Class WeightedMean

    • Constructor Detail

      • WeightedMean

        public WeightedMean()
      • WeightedMean

        public WeightedMean​(double[] data,
                            double[] weights)
    • Method Detail

      • addData

        public void addData​(double... data)
        Description copied from interface: Statistic
        Recompute the statistic with more data, incrementally if possible.
        Specified by:
        addData in interface Statistic
        Parameters:
        data - an array of new items
      • addData

        public void addData​(double[] data,
                            double[] weights)
      • N

        public long N()
        Description copied from interface: Statistic
        Get the size of the sample.
        Specified by:
        N in interface Statistic
        Returns:
        the sample size
      • value

        public double value()
        Description copied from interface: Statistic
        Get the value of the statistic.
        Specified by:
        value in interface Statistic
        Returns:
        the statistic
      • sumOfWeights

        public double sumOfWeights()