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))));
internal HistogramBucket(decimal lowerBound, BucketSize bucketSize, NoisyCount noisyCount) { LowerBound = lowerBound; BucketSize = bucketSize; this.noisyCount = noisyCount; }