public StatisticalDataHistogram[] CreateHistogram(
            StatisticalData[] data,
            TimeFrame[] timeFrames,
            int intervalsCount)
        {
            ThresholdMinMaxValue minMax = new MinMaxCalculator().Calculate(data);

            return(HistogramCalculator.CreateBucketsAndHistogram(data, timeFrames, intervalsCount, minMax));
        }
Пример #2
0
        // Token: 0x060004D7 RID: 1239 RVA: 0x0001E864 File Offset: 0x0001CA64
        public StatisticalDataHistogram[] CreateHistogramWithScaledInterval(StatisticalData[] data, TimeFrame[] timeFrames, int intervalsCount, Type dataType)
        {
            ThresholdMinMaxValue thresholdMinMaxValue = new MinMaxCalculator().Calculate(data);

            if (dataType != null && dataType == typeof(int))
            {
                int num = (int)(thresholdMinMaxValue.Max - thresholdMinMaxValue.Min);
                if (num == 0)
                {
                    num = 1;
                }
                intervalsCount = Math.Min(num, intervalsCount);
            }
            return(HistogramCalculator.CreateBucketsAndHistogram(data, timeFrames, intervalsCount, thresholdMinMaxValue));
        }
        public StatisticalDataHistogram[] CreateHistogramWithScaledInterval(
            StatisticalData[] data,
            TimeFrame[] timeFrames,
            int intervalsCount,
            Type dataType)
        {
            ThresholdMinMaxValue minMax = new MinMaxCalculator().Calculate(data);

            if (dataType != (Type)null && dataType == typeof(int))
            {
                int val1 = (int)(minMax.get_Max() - minMax.get_Min());
                if (val1 == 0)
                {
                    val1 = 1;
                }
                intervalsCount = Math.Min(val1, intervalsCount);
            }
            return(HistogramCalculator.CreateBucketsAndHistogram(data, timeFrames, intervalsCount, minMax));
        }