Esempio n. 1
0
 ///添加一个值为d和p元素
 public void Add(Double d, Double p)
 {
     if (count == M)
         Enlarge();
     try
     {
         Buf[count++] = new TableNode();
     }
     catch (Exception)
     {
         throw;
     }
     Buf[count - 1].data = d;
     Buf[count - 1].probability = p;
 }
Esempio n. 2
0
 //添加一个空元素
 public void Add()
 {
     if (count == M)
         Enlarge();
     try
     {
         Buf[count++] = new TableNode();
     }
     catch (Exception)
     {
         throw;
     }
 }