示例#1
0
        //平分成若干个区间
        public void Spliter()
        {
            this.AllMinArea.Clear();
            double MiniAreaLength = (this.b - this.a) / count_MinArea;
            for (int i = 0; i < count_MinArea; i++)
            {
                MiniArea temp = new MiniArea();
                temp.min = this.a + i * MiniAreaLength;
                temp.max = this.a + (i + 1) * MiniAreaLength;

                this.AllMinArea.Add(temp);
            }
        }
示例#2
0
 //求样本数据落在小区间的个数
 public void NiAtPerMinArea(MiniArea iArea)
 {
     int Ni = 0;
     for (int i = 0; i < this.YangBen.Count; i++)
     {
         double f = (double)YangBen[i];
         if (f <= iArea.max && f >= iArea.min)
         {
             Ni++;
         }
     }
     iArea.Ni = Ni;
 }