Returns the arithmetic mean of the result set. avg() is an alias for this method.

@param meter the meter of the mean
@return the mean value.
772220
public final double mean(final AbstractMeter meter) {
        checkIfMeterExists(meter);
        final AbstractUnivariateStatistic mean = new Mean();
        final CollectionDoubleCollection doubleColl = new CollectionDoubleCollection(this.meterResults.get(meter));
        return mean.evaluate(doubleColl.toArray(), 0, doubleColl.toArray().length);
    }
453823
public static double mean( InterleavedU16 img ) {
		return sum(img)/(double)(img.width*img.height*img.numBands);
	}
76478
public final double sampleSigma(int n)
  {
    synchronized (_lock) {
      long count = _count.get();
      long lastCount = _lastStdCount;
      _lastStdCount = count;

      double sum = _sum.get();
      double lastSum = _lastStdSum;
      _lastStdSum = sum;

      double sumSquare = _sumSquare;
      _sumSquare = 0;

      if (count == lastCount)
        return 0;

      double avg = (sum - lastSum) / (count - lastCount);
      double part = (count - lastCount) * sumSquare - sum * sum;

      if (part < 0)
        part = 0;

      double std = Math.sqrt(part) / (count - lastCount);

      return _scale * (avg + n * std);
    }
  }
506059
@NonNull
    public static Expression avg(@NonNull Expression expression) {
        if (expression == null) {
            throw new IllegalArgumentException("expression cannot be null.");
        }
        return new Expression.FunctionExpression("AVG()", Arrays.asList(expression));
    }
52277
public float getMeanValue() {
    if (Measure_Type.featOkTst && ((Measure_Type)jcasType).casFeat_meanValue == null)
      jcasType.jcas.throwFeatMissing("meanValue", "ch.epfl.bbp.uima.types.Measure");
    return jcasType.ll_cas.ll_getFloatValue(addr, ((Measure_Type)jcasType).casFeatCode_meanValue);}
564170
@Override
    public double average()
    {
        readLock.lock();
        try
        {
            double s = 0;
            PrimitiveIterator.OfInt it = modIterator();
            while (it.hasNext())
            {
                s += ring[it.nextInt()];
            }
            return s/(count());
        }
        finally
        {
            readLock.unlock();
        }
    }
1038909
public static /*@pure@*/ double mean(double[] vector) {
  
    double sum = 0;

    if (vector.length == 0) {
      return 0;
    }
    for (int i = 0; i < vector.length; i++) {
      sum += vector[i];
    }
    return sum / (double) vector.length;
  }
852556
def mean(self, axis=0, *args, **kwargs):
        
        nv.validate_mean(args, kwargs)
        valid_vals = self._valid_sp_values
        sp_sum = valid_vals.sum()
        ct = len(valid_vals)

        if self._null_fill_value:
            return sp_sum / ct
        else:
            nsparse = self.sp_index.ngaps
            return (sp_sum + self.fill_value * nsparse) / (ct + nsparse)
1213197
public static double mean(@javax.annotation.Nonnull final double[] op) {
    return com.simiacryptus.util.ArrayUtil.sum(op) / op.length;
  }
424149
public static double mean( InterleavedS16 img ) {
		return sum(img)/(double)(img.width*img.height*img.numBands);
	}
1219008
public static double mean(int[] values) {
        double sum = 0d;
        for (int i : values)
            sum += i;
        return sum / values.length;
    }
1067855
def variance(sample = false)
      a = numerify
      avg = a.average
      sum = a.inject(0) { |sum, value| sum + (value - avg) ** 2}
      (1 / (a.length.to_f - (sample ? 1 : 0)) * sum)
    end
1085163
public static double variance( GrayU16 img , double mean ) {

		if( BoofConcurrency.USE_CONCURRENT ) {
			return ImplImageStatistics_MT.variance(img,mean);
		} else {
			return ImplImageStatistics.variance(img,mean);
		}
	}
349970
public final double getConf05(final AbstractMeter meter) {
        checkIfMeterExists(meter);
        final AbstractUnivariateStatistic conf05 = new Percentile(5.0);
        final CollectionDoubleCollection doubleColl = new CollectionDoubleCollection(this.meterResults.get(meter));
        return conf05.evaluate(doubleColl.toArray(), 0, doubleColl.toArray().length);

    }
900728
public Long getValue(Meter.Type meterType) {
        if (meterType == Meter.Type.DISTRIBUTION_SUMMARY) {
            return getDistributionSummaryValue();
        }
        if (meterType == Meter.Type.TIMER) {
            return getTimerValue();
        }
        return null;
    }
557214
public static double mean( InterleavedS32 img ) {
		return sum(img)/(double)(img.width*img.height*img.numBands);
	}
836299
public Double averagePrecision() 
    {
        double n = 0;
        double sumPrecision = 0;
        for (int i=0; i<pairs.length; i++) {
            if (correctPair(i)) {
                n++;
                double precisionAtRankI = n/(i+1.0);
                sumPrecision += precisionAtRankI;
            }
        }
        return new Double(sumPrecision / numCorrectPairs);
    }