Exemple #1
0
 public ProcessInfo(int T, string[] Filters, Vector <double> X0Hat, Matrix <double> DX0Hat)
 {
     Count = 0;
     mx    = Exts.ZerosArrayOfShape(X0Hat.ToColumnMatrix(), T);
     Dx    = Exts.ZerosArrayOfShape(DX0Hat, T);
     FilterQualityInfos = new FilterQualityInfo[Filters.Length];
     for (int j = 0; j < Filters.Length; j++)
     {
         FilterQualityInfos[j] = new FilterQualityInfo(Filters[j], T, X0Hat, DX0Hat);
     }
 }
Exemple #2
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);
     }
 }