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); }
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++; } } }