Ejemplo n.º 1
0
        public static Histogram <double, object> ToHistogram(this IEnumerable <double> data, double precision)
        {
            var header = new object();
            var hist   = new Histogram <double, object>(z => z * precision);

            foreach (var e in data)
            {
                hist.AddValue(header, (int)(e / precision), 1);
            }
            return(hist);
        }