public override void UntimedPrepare() { if (preparation == null) { preparation = new Preparation(count); } tree = makeTree(count); }
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); } }
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++; } }
public AllocTestRange2Map(IRange2Map <float> actual) { this.actual = actual; }