public override void UntimedPrepare() { if (preparation == null) { preparation = new Preparation(count); } tree = makeTree(count); }
private static void UnloadTree(IRankMap <int, int> tree, int?count, int[] indices) { int i = 0; while ((count.HasValue && (i < count.Value)) || (!count.HasValue && (tree.Count != 0))) { int rank = indices[i]; int key = tree.GetKeyByRank(rank); tree.Remove(key); i++; } }
private static void LoadTree(IRankMap <int, int> tree, int count, int[] keys) { for (int i = 0; i < count; i++) { int key = keys[i]; tree.TryAdd(key, key); } if (tree.Count < .999 * count) { throw new InvalidOperationException("too many collisions - choose a better seed"); } }
public AllocTestRankMap(IRankMap <int, float> actual) { this.actual = actual; }