Пример #1
0
        public void AddingZeroDoesNothing(long count, double noise)
        {
            var nc     = NoisyCount.WithNoise(count, noise);
            var result = NoisyCount.Zero + nc;

            Assert.True(result == nc);
        }
Пример #2
0
        public void NoiseValuesCombinedCorrectly()
        {
            var a        = NoisyCount.WithNoise(100, 3);
            var b        = NoisyCount.WithNoise(200, 4);
            var expected = NoisyCount.WithNoise(300, 5);

            var result = a + b;

            Assert.True(result == expected);
        }
Пример #3
0
 internal HistogramBucket(decimal lowerBound, BucketSize bucketSize, NoisyCount noisyCount)
 {
     LowerBound      = lowerBound;
     BucketSize      = bucketSize;
     this.noisyCount = noisyCount;
 }