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

Member Variables

To simplify the implementation of the algorithms, the member variable parent has been added. The parent member variable is a pointer to the BTree node which is the parent of the given node. Whereas the array of pointers to the children of a node, i.e., the subtree member variable of the MWayTree class, allows an algorithm to move down the tree; the parent member variable admits movement up the tree. Since the root of a tree has no parent, the parent member variable of the root node contains the null pointer.


next up previous contents index

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