Example #1
0
 public static IEnumerable <Histogram> FromQueryRows(IEnumerable <SingleColumnHistogram.Result> queryResults) =>
 from row in queryResults
     where row.HasValue
 group row by row.BucketSize into bucketGroup
 let bucketSize = new BucketSize(bucketGroup.Key)
                  select new Histogram(
     bucketSize,
     bucketGroup.Select(b =>
                        new HistogramBucket(
                            (decimal)b.LowerBound,
                            bucketSize,
                            NoisyCount.FromCountableRow(b))));
Example #2
0
 internal HistogramBucket(decimal lowerBound, BucketSize bucketSize, NoisyCount noisyCount)
 {
     LowerBound      = lowerBound;
     BucketSize      = bucketSize;
     this.noisyCount = noisyCount;
 }