9.2 Operations [ToC] [Index]     [Skip Back] [Skip Fwd]     [Prev] [Up] [Next]

Now we'll implement all the usual operations for TRB trees. Here's the outline. We can reuse everything from TBSTs except insertion, deletion, and copy functions. The copy function is implemented by reusing the version for TAVL trees, but copying colors instead of balance factors.

336. <TRB functions 336> =
<TBST creation function; tbst => trb 252>
<TBST search function; tbst => trb 253>
<TRB item insertion function 337>
<Table insertion convenience functions; tbl => trb 592>
<TRB item deletion function 349>
<TBST traversal functions; tbst => trb 268>
<TAVL copy function; tavl => trb; tavl_balance => trb_color 329>
<TBST destruction function; tbst => trb 281>
<Default memory allocation functions; tbl => trb 6>
<Table assertion functions; tbl => trb 594>

This code is included in 334.