-
Notifications
You must be signed in to change notification settings - Fork 2
Usage
andrevdm edited this page Sep 13, 2010
·
1 revision
Here is a example of a T-Tree being created and used
using TTree;
...
TTreeRoot<int> ttree = new TTreeRoot<int>( 18, 20 );
ttree.Add( 10 );
ttree.Add( 1 );
ttree.Add( 17 );
foreach( int i in tree )
{
Console.WriteLine( i );
}
- Create the T-Tree root, specifying the minimum and maximum occupancy count. “The minimum and maximum counts will usually differ by just a small amount, on the order of one or two items, which turns out to be enough to signifcantly reduce the need for tree rotations.” (1)
- Add some items
- Enumerate all the items in the tree
In short you use the T-Tree the same way you would use any other ICollection.
(1): Tobin J. Lehman and Michael J. Carey, A Study of Index Structures for Main Memory Database Management Systems. VLDB 1986