示例#1
0
		public void Reset(int number)
		{
			Allocate(number);

			for (int i = 0; i < number; i++)
			{
				Element element = new Element();
				element.ID = i; 
				element.Size = 1;
				_elements.Insert(i, element);
			}
		}
示例#2
0
 private static int Sort(Element x, Element y)
 {
     if (x.ID < y.ID) return -1;
     //else if (x.ID > y.ID) return 1;
     else return 0;
 }