コード例 #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
ファイル: HistogramBucket.cs プロジェクト: edongashi/explorer
 internal HistogramBucket(decimal lowerBound, BucketSize bucketSize, NoisyCount noisyCount)
 {
     LowerBound      = lowerBound;
     BucketSize      = bucketSize;
     this.noisyCount = noisyCount;
 }