示例#1
0
 public override void CalculatePartialValue()
 {
     ds.CalculatePartialValue();
     if (Double.IsNaN(ds.PartialValue))
     {
         PartialValue = Double.NaN;
     }
     else
     {
         int countLessThan = 0;
         for (int i = 1; i < period; i++)
         {
             if (ds.PartialValue > ds[ds.Count - period + i])
             {
                 countLessThan++;
             }
         }
         PartialValue = (double)countLessThan / (period - 1);
     }
 }
示例#2
0
文件: DV2.cs 项目: ToniTsai/LeetCode
 public override void CalculatePartialValue()
 {
     dv2.CalculatePartialValue();
     PartialValue = dv2.PartialValue;
 }