예제 #1
0
 public override double GetStatistic(double dParam, SummaryStatisticsTypes qStat)
 {
     if (SummaryStatisticsTypes.Percentile == qStat)
     {
         return(GetPercentile(dParam));
     }
     else
     {
         return(base.GetStatistic(dParam, qStat));
     }
 }
예제 #2
0
 public virtual double GetStatistic(double dOptionalArg1, SummaryStatisticsTypes qStatistic)
 {
     try
     {
         if (SummaryStatisticsTypes.Count == qStatistic)
         {
             return(this.Count);
         }
         else if (SummaryStatisticsTypes.Average == qStatistic)
         {
             return(this.Mean);
         }
         else if (SummaryStatisticsTypes.Maximum == qStatistic)
         {
             return(this.Max);
         }
         else if (SummaryStatisticsTypes.Minimum == qStatistic)
         {
             return(this.Min);
         }
         else if (SummaryStatisticsTypes.Range == qStatistic)
         {
             return(this.Max - this.Min);
         }
         else if (SummaryStatisticsTypes.StdDev == qStatistic)
         {
             return(this.StdDev);
         }
         else if (SummaryStatisticsTypes.Total == qStatistic)
         {
             return(this.Total);
         }
         else
         {
             string fn = MethodBase.GetCurrentMethod().Name;
             LogHelper.HandleAppErr(this, fn, "Stats class does not support statistic: " + qStatistic.ToString());
             return(0);
         }
     }
     catch (Exception exc)
     {
         string fn = MethodBase.GetCurrentMethod().Name;
         LogHelper.HandleExc(this, fn, exc);
         return(0);
     }
 }