Пример #1
0
 public ProcessInfo(ProcessInfo[] infos)
 {
     Count = (int)infos.Select(i => (double)i.Count).Sum();
     double[] TrCounts = infos.Select(i => (double)i.Count).ToArray();
     mx = Exts.Average(infos.Select(i => i.mx).ToArray(), TrCounts);
     Dx = Exts.Average(infos.Select(i => i.Dx).ToArray(), TrCounts);
     FilterQualityInfos = new FilterQualityInfo[infos[0].FilterQualityInfos.Count()];
     for (int j = 0; j < FilterQualityInfos.Count(); j++)
     {
         string filter = infos[0].FilterQualityInfos[j].FilterName;
         FilterQualityInfos[j] = new FilterQualityInfo(filter, infos[0].FilterQualityInfos[j].mError.Length, infos[0].FilterQualityInfos[j].mError[0], infos[0].FilterQualityInfos[j].DError[0]);
         double[] FTrCounts = infos.Select(i => (double)i.FilterQualityInfos[j].Count).ToArray();
         FilterQualityInfos[j].mError = Exts.Average(infos.Select(i => i.FilterQualityInfos[j].mError).ToArray(), FTrCounts);
         FilterQualityInfos[j].DError = Exts.Average(infos.Select(i => i.FilterQualityInfos[j].DError).ToArray(), FTrCounts);
         FilterQualityInfos[j].mxHat  = Exts.Average(infos.Select(i => i.FilterQualityInfos[j].mxHat).ToArray(), FTrCounts);
         FilterQualityInfos[j].mKHat  = Exts.Average(infos.Select(i => i.FilterQualityInfos[j].mKHat).ToArray(), FTrCounts);
     }
 }