// Needed for cloning (shallow copy) this BTree. private void Initialize(BTreeAlgorithm <TKey, TValue> BTree) { this.SlotLength = BTree.SlotLength; this.Root = BTree.Root; //Copy CurrentItem. "Copy" as CurrentItem is value type. this.CurrentItem = BTree.CurrentItem; this.Comparer = BTree.Comparer; // create another set of temporary slots for thread safe 'Search' operation support TempSlots = new BTreeItem <TKey, TValue> [SlotLength + 1]; TempChildren = new TreeNode[SlotLength + 2]; }
internal BTreeAlgorithm(BTreeAlgorithm <TKey, TValue> BTree) { Initialize(BTree); }