Re: Balanced Tree grow()
Adam Megacz <[email protected]> Sat, 10 Apr 2004 00:16:48 -0700
| Newsgroups | gmane.comp.java.xwt.core |
|---|---|
| Organization | XWT |
| Message-ID | <[email protected]> |
Brian Alliet <[email protected]> writes: > When we grow() the numbers of each node obviously are going to > change. That means the root node in every BalancedTree instance needs > to change. Unfortunately we have no way of getting a reference to > every BalancedTree instance. Without doing something ugly with weak > pointers I don't think it is possible. Yeah, that's why I didn't implement grow(). I couldn't come up with a good way to do it. > One thing I was thinking of doing is adding an extra layer of > indirection for the root node. BalancedTree would contain a static > array of root nodes and each BalancedTree instance would point to one > element of that arrray. (That is called a handle right?) Definately possible. But ugly. Are we really running out of NUM_SLOTS? - a