Beispiel #1
0
        private void SetBinStatistics(SplitFailOptions options)
        {
            var startTime = options.StartDate;

            do
            {
                var endTime = startTime.AddMinutes(15);
                var cycles  = Cycles.Where(c => c.StartTime >= startTime && c.StartTime < endTime).ToList();
                Bins.Add(new SplitFailBin(startTime, endTime, cycles));
                startTime = startTime.AddMinutes(15);
            } while (startTime < options.EndDate);
        }
Beispiel #2
0
        private void Compute(IEnumerable <T1> data)
        {
            while (Bins.Count < BinEdges.Length)
            {
                Bins.Add(new List <T1>());
            }

            foreach (var datum in data)
            {
                int binIndex = GetBinIndex(datum);
                if (binIndex >= 0)
                {
                    Bins[binIndex].Add(datum);
                    Total++;
                }
            }
        }