Beispiel #1
0
        // 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];
        }
Beispiel #2
0
 internal BTreeAlgorithm(BTreeAlgorithm <TKey, TValue> BTree)
 {
     Initialize(BTree);
 }