Data Structures and Algorithms with Object-Oriented Design Patterns in C#
next up previous contents index

Constructor and AttachSubtree Methods

Program gif defines a constructor that takes a single int argument M and creates an empty B-tree of order M. By default, the parent field is null.

The AttachSubtree method is used to attach a new subtree to a given node. The AttachSubtree routine takes an integer, i, and an M-way tree (which must be a B-tree instance), and makes it the tex2html_wrap_inline57621 subtree of the given node. Notice that this method also modifies the parent field in the attached node.


next up previous contents index

Bruno Copyright © 2001 by Bruno R. Preiss, P.Eng. All rights reserved.