/// <summary> /// Get a copy of this histogram, corrected for coordinated omission. /// </summary> /// <param name="expectedIntervalBetweenValueSamples">If <paramref name="expectedIntervalBetweenValueSamples"/> is larger than 0, add auto-generated value records as appropriate if value is larger than <paramref name="expectedIntervalBetweenValueSamples"/></param> /// <returns>a copy of this histogram, corrected for coordinated omission.</returns> /// <remarks> /// To compensate for the loss of sampled values when a recorded value is larger than the expected interval between value samples, /// the new histogram will include an auto-generated additional series of decreasingly-smaller(down to the <paramref name="expectedIntervalBetweenValueSamples"/>) /// value records for each count found in the current histogram that is larger than the expectedIntervalBetweenValueSamples. /// <para> /// Note: This is a post-correction method, as opposed to the at-recording correction method provided by <seealso cref="HistogramBase.RecordValueWithExpectedInterval"/>. /// The two methods are mutually exclusive, and only one of the two should be be used on a given data set to correct for the same coordinated omission issue. /// </para> /// See notes in the description of the Histogram calls for an illustration of why this corrective behavior is important. /// </remarks> public override HistogramBase CopyCorrectedForCoordinatedOmission(long expectedIntervalBetweenValueSamples) { SynchronizedHistogram toHistogram = new SynchronizedHistogram(LowestTrackableValue, HighestTrackableValue, NumberOfSignificantValueDigits); toHistogram.AddWhileCorrectingForCoordinatedOmission(this, expectedIntervalBetweenValueSamples); return(toHistogram); }
/// <summary> /// Create a copy of this histogram, complete with data and everything. /// </summary> /// <returns>A distinct copy of this histogram.</returns> public override HistogramBase Copy() { SynchronizedHistogram copy = new SynchronizedHistogram(LowestTrackableValue, HighestTrackableValue, NumberOfSignificantValueDigits); copy.Add(this); return(copy); }
public override AbstractHistogram copyCorrectedForCoordinatedOmission(long expectedIntervalBetweenValueSamples) { lock (this) { SynchronizedHistogram toHistogram = new SynchronizedHistogram(this); toHistogram.addWhileCorrectingForCoordinatedOmission(this, expectedIntervalBetweenValueSamples); return(toHistogram); } }
public override AbstractHistogram copy() { SynchronizedHistogram copy; lock (this) { copy = new SynchronizedHistogram(this); } copy.add(this); return(copy); }
/// <summary> /// Get a copy of this histogram, corrected for coordinated omission. /// </summary> /// <param name="expectedIntervalBetweenValueSamples">If <paramref name="expectedIntervalBetweenValueSamples"/> is larger than 0, add auto-generated value records as appropriate if value is larger than <paramref name="expectedIntervalBetweenValueSamples"/></param> /// <returns>a copy of this histogram, corrected for coordinated omission.</returns> /// <remarks> /// To compensate for the loss of sampled values when a recorded value is larger than the expected interval between value samples, /// the new histogram will include an auto-generated additional series of decreasingly-smaller(down to the <paramref name="expectedIntervalBetweenValueSamples"/>) /// value records for each count found in the current histogram that is larger than the expectedIntervalBetweenValueSamples. /// <para> /// Note: This is a post-correction method, as opposed to the at-recording correction method provided by <seealso cref="HistogramBase.RecordValueWithExpectedInterval"/>. /// The two methods are mutually exclusive, and only one of the two should be be used on a given data set to correct for the same coordinated omission issue. /// </para> /// See notes in the description of the Histogram calls for an illustration of why this corrective behavior is important. /// </remarks> public override HistogramBase CopyCorrectedForCoordinatedOmission(long expectedIntervalBetweenValueSamples) { SynchronizedHistogram toHistogram = new SynchronizedHistogram(LowestTrackableValue, HighestTrackableValue, NumberOfSignificantValueDigits); toHistogram.AddWhileCorrectingForCoordinatedOmission(this, expectedIntervalBetweenValueSamples); return toHistogram; }
/// <summary> /// Create a copy of this histogram, complete with data and everything. /// </summary> /// <returns>A distinct copy of this histogram.</returns> public override HistogramBase Copy() { SynchronizedHistogram copy = new SynchronizedHistogram(LowestTrackableValue, HighestTrackableValue, NumberOfSignificantValueDigits); copy.Add(this); return copy; }