/// <summary> /// Returns a clone of this estimator. /// </summary> /// <returns></returns> public object Clone() { MeanAccumulator result = new MeanAccumulator(); result.SetTo(this); return(result); }
/// <summary> /// Sets the state of this estimator from the specified estimator. /// </summary> /// <param name="value"></param> public void SetTo(MeanAccumulator value) { Mean = value.Mean; Count = value.Count; }
/// <summary> /// Adds all observations added to another accumulator. /// </summary> /// <param name="meanAccumulator"></param> public void Add(MeanAccumulator meanAccumulator) { Add(meanAccumulator.Mean, meanAccumulator.Count); }