Ejemplo n.º 1
0
 /// <param name="reference">The stats against which the deviation will be computed.</param>
 public VariableStats AddMeasurement(double value, VariableStats reference)
 {
     return(new VariableStats(
                _nrMeasurements + 1,
                _total + value,
                _devTotal + Math.Abs(value - reference.Avg),
                Math.Min(Min, value), Math.Max(Max, value)
                ));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Update Stats to reflect the statistics gathered between now and the
 /// previous Refresh call.
 /// </summary>
 public void Refresh()
 {
     Stats         = _measurements;
     _measurements = VariableStats.CreateNew();
     CurrentValue  = 0;
 }
Ejemplo n.º 3
0
 public void AddMeasurement(double value)
 {
     _measurements = _measurements.AddMeasurement(value, Stats);
 }