public void AddObservations(Histogram histogram)
{
if (_upperBounds.Length != histogram._upperBounds.Length)
{
throw new ArgumentOutOfRangeException("Histograms must have matching intervals");
}
for (int i = 0, size = _upperBounds.Length; i < size; i++)
{
if (_upperBounds[i] != histogram._upperBounds[i])
{
throw new ArgumentOutOfRangeException("Histograms must have matching intervals");
}
}
for (int i = 0, size = _counts.Length; i < size; i++)
{
_counts[i] += histogram._counts[i];
}
TrackRange(histogram._minValue);
TrackRange(histogram._maxValue);
}