예제 #1
0
        public override void UntimedPrepare()
        {
            if (preparation == null)
            {
                preparation = new Preparation(count);
            }

            tree = makeTree(count);
        }
예제 #2
0
 private static void LoadTree(IRange2Map <int> tree, int count, STuple <int, int, int>[] inserts)
 {
     for (int i = 0; i < count; i++)
     {
         STuple <int, int, int> insert = inserts[i];
         int start = insert.Item1;
         tree.NearestLessOrEqual(start, Side.X, out start);
         tree.Insert(start, Side.X, insert.Item2, insert.Item3, insert.Item1);
     }
 }
예제 #3
0
        private static void UnloadTree(IRange2Map <int> tree, int?count, int[] deletes)
        {
            int i = 0;

            while ((count.HasValue && (i < count.Value)) || (!count.HasValue && (tree.Count != 0)))
            {
                int start = deletes[i];
                tree.NearestLessOrEqual(start, Side.X, out start);
                tree.Delete(start, Side.X);
                i++;
            }
        }
예제 #4
0
 public AllocTestRange2Map(IRange2Map <float> actual)
 {
     this.actual = actual;
 }