GNU libavl 2.0.1
Author: Ben Pfaff

9.2 Operations |

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.

9.1 Data Types | 9 Threaded Red-Black Trees | 9.3 Insertion