This file is indexed.

/usr/share/doc/libcext-doc/html/group__cxtree.html is in libcext-doc 5.3.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>C Standard Library Extensions: Balanced Binary Trees</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">C Standard Library Extensions
   &#160;<span id="projectnumber">1.0.5</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Balanced Binary Trees</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef cxbool(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga9fe906309049ab24e407cd25fcd22f17">cx_tree_compare_func</a> )(cxcptr, cxcptr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The tree's key comparison operator function.  <a href="#ga9fe906309049ab24e407cd25fcd22f17"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cx_tree_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga6038e74547e7e3ac3280c519914b60a3">cx_tree_begin</a> (const cx_tree *tree)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an iterator to the first pair in the tree.  <a href="#ga6038e74547e7e3ac3280c519914b60a3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cx_tree_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#gadff64dc3840bb3d663e6b93b89e52d1e">cx_tree_end</a> (const cx_tree *tree)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an iterator for the position after the last pair in the tree.  <a href="#gadff64dc3840bb3d663e6b93b89e52d1e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cx_tree_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga86c1d604b075a32860f0f66cf678267c">cx_tree_next</a> (const cx_tree *tree, cx_tree_const_iterator position)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an iterator for the next pair in the tree.  <a href="#ga86c1d604b075a32860f0f66cf678267c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cx_tree_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga7a7a6770d510c426f281fa9d46e1be5e">cx_tree_previous</a> (const cx_tree *tree, cx_tree_const_iterator position)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an iterator for the previous pair in the tree.  <a href="#ga7a7a6770d510c426f281fa9d46e1be5e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga377e4c1587471733983f04707f8e619e">cx_tree_clear</a> (cx_tree *tree)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove all pairs from a tree.  <a href="#ga377e4c1587471733983f04707f8e619e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cxbool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga148c828066a5d05e95acd4ec3a525bc8">cx_tree_empty</a> (const cx_tree *tree)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether a tree is empty.  <a href="#ga148c828066a5d05e95acd4ec3a525bc8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cx_tree *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga4d5b89c5e8709645b85996d05478d71e">cx_tree_new</a> (<a class="el" href="group__cxtree.html#ga9fe906309049ab24e407cd25fcd22f17">cx_tree_compare_func</a> compare, cx_free_func key_destroy, cx_free_func value_destroy)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new tree without any elements.  <a href="#ga4d5b89c5e8709645b85996d05478d71e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga5e30a6c27e8e423d35a0818f264337fe">cx_tree_delete</a> (cx_tree *tree)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a tree and all its elements.  <a href="#ga5e30a6c27e8e423d35a0818f264337fe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cxsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga3cc3eec66e54e3292d3354ffd2076696">cx_tree_size</a> (const cx_tree *tree)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the actual number of pairs in the tree.  <a href="#ga3cc3eec66e54e3292d3354ffd2076696"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cxsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga2a04a36bb3a449f14efa25e784169b57">cx_tree_max_size</a> (const cx_tree *tree)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the maximum number of pairs possible.  <a href="#ga2a04a36bb3a449f14efa25e784169b57"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__cxtree.html#ga9fe906309049ab24e407cd25fcd22f17">cx_tree_compare_func</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga40f1e3c1aff10f23fa128187f37f30ce">cx_tree_key_comp</a> (const cx_tree *tree)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the key comparison function.  <a href="#ga40f1e3c1aff10f23fa128187f37f30ce"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#gaf79317c9c323f0d7b1903b7f23c1012e">cx_tree_swap</a> (cx_tree *tree1, cx_tree *tree2)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap the contents of two trees.  <a href="#gaf79317c9c323f0d7b1903b7f23c1012e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cxptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga5e47b9013eaeb6fe294e02d54a1e8cdf">cx_tree_assign</a> (cx_tree *tree, cx_tree_iterator position, cxcptr data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assign data to an iterator position.  <a href="#ga5e47b9013eaeb6fe294e02d54a1e8cdf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cxptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga5578369c1a53b8592ff83032c6780cfb">cx_tree_get_key</a> (const cx_tree *tree, cx_tree_const_iterator position)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the key from a given iterator position.  <a href="#ga5578369c1a53b8592ff83032c6780cfb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cxptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga4b15b6abafbb4f528b5a1f0090b48f86">cx_tree_get_value</a> (const cx_tree *tree, cx_tree_const_iterator position)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the data from a given iterator position.  <a href="#ga4b15b6abafbb4f528b5a1f0090b48f86"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cx_tree_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#gaa36076ac9467d17c8655a9a94a5f7a44">cx_tree_find</a> (const cx_tree *tree, cxcptr key)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Locate an element in the tree.  <a href="#gaa36076ac9467d17c8655a9a94a5f7a44"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cx_tree_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga22e4896d6cd7486dc6d73eb7c3a56fea">cx_tree_lower_bound</a> (const cx_tree *tree, cxcptr key)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the beginning of a subsequence.  <a href="#ga22e4896d6cd7486dc6d73eb7c3a56fea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cx_tree_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga410dcaddb7845533076d98466f51c053">cx_tree_upper_bound</a> (const cx_tree *tree, cxcptr key)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Find the end of a subsequence.  <a href="#ga410dcaddb7845533076d98466f51c053"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga9db4e043848ab20c0111b9a1b081593a">cx_tree_equal_range</a> (const cx_tree *tree, cxcptr key, cx_tree_iterator *begin, cx_tree_iterator *end)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Find a subsequence matching a given key.  <a href="#ga9db4e043848ab20c0111b9a1b081593a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cxsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#gaede41b65d866b8c6cd7589bbebd81b39">cx_tree_count</a> (const cx_tree *tree, cxcptr key)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of elements matching a key.  <a href="#gaede41b65d866b8c6cd7589bbebd81b39"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cx_tree_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga1f8f15e701fd1eb4ebe15639aea354e3">cx_tree_insert_unique</a> (cx_tree *tree, cxcptr key, cxcptr data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempt to insert data into a tree.  <a href="#ga1f8f15e701fd1eb4ebe15639aea354e3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cx_tree_iterator&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga07b038bf6018884fa92a5aa316e4cb66">cx_tree_insert_equal</a> (cx_tree *tree, cxcptr key, cxcptr data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert data into a tree.  <a href="#ga07b038bf6018884fa92a5aa316e4cb66"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#gaea5f45961ba5ab503c751f54810e8258">cx_tree_erase_position</a> (cx_tree *tree, cx_tree_iterator position)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Erase an element from a tree.  <a href="#gaea5f45961ba5ab503c751f54810e8258"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#gae573050dfd0d7cc829844609ff4a1dc2">cx_tree_erase_range</a> (cx_tree *tree, cx_tree_iterator begin, cx_tree_iterator end)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Erase a range of elements from a tree.  <a href="#gae573050dfd0d7cc829844609ff4a1dc2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cxsize&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#ga14027eafaeb3eaddd513b839672c5e92">cx_tree_erase</a> (cx_tree *tree, cxcptr key)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Erase all elements from a tree matching the provided key.  <a href="#ga14027eafaeb3eaddd513b839672c5e92"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">cxbool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cxtree.html#gaba9a431c2237e6b98584dd47052f8529">cx_tree_verify</a> (const cx_tree *tree)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Validate a tree.  <a href="#gaba9a431c2237e6b98584dd47052f8529"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>The module implements a balanced binary tree type, i.e. a container managing key/value pairs as elements. The container is optimized for lookup operations.</p>
<dl class="user"><dt><b>Synopsis:</b></dt><dd><div class="fragment"><pre class="fragment"><span class="preprocessor">   #include &lt;cxtree.h&gt;</span>
</pre></div> </dd></dl>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga9fe906309049ab24e407cd25fcd22f17"></a><!-- doxytag: member="cxtree.h::cx_tree_compare_func" ref="ga9fe906309049ab24e407cd25fcd22f17" args=")(cxcptr, cxcptr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef cxbool(* <a class="el" href="group__cxtree.html#ga9fe906309049ab24e407cd25fcd22f17">cx_tree_compare_func</a>)(cxcptr, cxcptr)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The tree's key comparison operator function. </p>
<p>This type of function is used by a tree internally to compare the keys of its elements. A key comparison operator returns <code>TRUE</code> if the comparison of its first argument with the second argument succeeds, and <code>FALSE</code> otherwise, as, for instance, the logical operators &lt; or &gt; do.</p>
<p>Examples:</p>
<ul>
<li>A less than operator for integer values <div class="fragment"><pre class="fragment"><span class="preprocessor">     #include &lt;cxtree.h&gt;</span>

     cxbool less_int(cxcptr i1, cxcptr i2)
     {
         <span class="keywordflow">return</span> *i1 &lt; *i2;
     }
</pre></div></li>
</ul>
<ul>
<li>A less than operator for strings <div class="fragment"><pre class="fragment"><span class="preprocessor">     #include &lt;string.h&gt;</span>
<span class="preprocessor">     #include &lt;cxtree.h&gt;</span>

     cxbool less_string(cxcptr s1, cxcptr s2)
     {
         <span class="keywordflow">return</span> strcmp(s1, s2) &lt; 0;
     }
</pre></div> </li>
</ul>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga5e47b9013eaeb6fe294e02d54a1e8cdf"></a><!-- doxytag: member="cxtree.c::cx_tree_assign" ref="ga5e47b9013eaeb6fe294e02d54a1e8cdf" args="(cx_tree *tree, cx_tree_iterator position, cxcptr data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cxptr <a class="el" href="group__cxtree.html#ga5e47b9013eaeb6fe294e02d54a1e8cdf">cx_tree_assign</a> </td>
          <td>(</td>
          <td class="paramtype">cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_tree_iterator&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cxcptr&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assign data to an iterator position. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">position</td><td>Iterator positions where the data will be stored. </td></tr>
    <tr><td class="paramname">data</td><td>Data to store.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Handle to the previously stored data object.</dd></dl>
<p>The function assigns a data object reference <em>data</em> to the iterator position <em>position</em> of the tree <em>tree</em>. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga80e8807a9c18e074bcac96a6477afb55">cx_map_assign()</a>, <a class="el" href="group__cxmap.html#gaeb1c59ace3e10f9588616d0b9ea7fbfc">cx_map_put()</a>, and <a class="el" href="group__cxmultimap.html#gae2c94b9833c1e2940c0cb626568c0e41">cx_multimap_assign()</a>.</p>

</div>
</div>
<a class="anchor" id="ga6038e74547e7e3ac3280c519914b60a3"></a><!-- doxytag: member="cxtree.c::cx_tree_begin" ref="ga6038e74547e7e3ac3280c519914b60a3" args="(const cx_tree *tree)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cx_tree_iterator <a class="el" href="group__cxtree.html#ga6038e74547e7e3ac3280c519914b60a3">cx_tree_begin</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get an iterator to the first pair in the tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>The tree to query.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Iterator for the first pair or <b><a class="el" href="group__cxtree.html#gadff64dc3840bb3d663e6b93b89e52d1e" title="Get an iterator for the position after the last pair in the tree.">cx_tree_end()</a></b> if the tree is empty.</dd></dl>
<p>The function returns a handle for the first pair in the tree <em>tree</em>. The returned iterator cannot be used directly to access the value field of the key/value pair, but only through the appropriate methods. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga156f4653538a24d512874a23213a2e1f">cx_map_begin()</a>, and <a class="el" href="group__cxmultimap.html#gaf08e21b17216433c2f4b9f5c8482abcb">cx_multimap_begin()</a>.</p>

</div>
</div>
<a class="anchor" id="ga377e4c1587471733983f04707f8e619e"></a><!-- doxytag: member="cxtree.c::cx_tree_clear" ref="ga377e4c1587471733983f04707f8e619e" args="(cx_tree *tree)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__cxtree.html#ga377e4c1587471733983f04707f8e619e">cx_tree_clear</a> </td>
          <td>(</td>
          <td class="paramtype">cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Remove all pairs from a tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>Tree to be cleared.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing.</dd></dl>
<p>The tree <em>tree</em> is cleared, i.e. all pairs are removed from the tree. Keys and values are destroyed using the key and value destructors set up during tree creation. After calling this function the tree is empty. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#gafe98264e8e9db4c0cfeba4561db37035">cx_map_clear()</a>, and <a class="el" href="group__cxmultimap.html#ga04e85e7fc13400eeb700066810e91e52">cx_multimap_clear()</a>.</p>

</div>
</div>
<a class="anchor" id="gaede41b65d866b8c6cd7589bbebd81b39"></a><!-- doxytag: member="cxtree.c::cx_tree_count" ref="gaede41b65d866b8c6cd7589bbebd81b39" args="(const cx_tree *tree, cxcptr key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cxsize <a class="el" href="group__cxtree.html#gaede41b65d866b8c6cd7589bbebd81b39">cx_tree_count</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cxcptr&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the number of elements matching a key. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">key</td><td>Key of the (key, value) pair(s) to locate.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of elements with the specified key.</dd></dl>
<p>Counts all elements of the tree <em>tree</em> matching the key <em>key</em>. </p>

<p>Referenced by <a class="el" href="group__cxmultimap.html#ga70527409d50026c0cfb85c491a55457d">cx_multimap_count()</a>.</p>

</div>
</div>
<a class="anchor" id="ga5e30a6c27e8e423d35a0818f264337fe"></a><!-- doxytag: member="cxtree.c::cx_tree_delete" ref="ga5e30a6c27e8e423d35a0818f264337fe" args="(cx_tree *tree)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__cxtree.html#ga5e30a6c27e8e423d35a0818f264337fe">cx_tree_delete</a> </td>
          <td>(</td>
          <td class="paramtype">cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroy a tree and all its elements. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>The tree to destroy.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing.</dd></dl>
<p>The tree <em>tree</em> is deallocated. All data values and keys are deallocated using the tree's key and value destructor. If no key and/or value destructor was set when the <em>tree</em> was created the keys and the stored data values are left untouched. In this case the key and value deallocation is the responsibility of the user.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__cxtree.html#ga4d5b89c5e8709645b85996d05478d71e" title="Create a new tree without any elements.">cx_tree_new()</a> </dd></dl>

<p>References <a class="el" href="group__cxmemory.html#ga535a509573c6617da8f0dccdb2710bc9">cx_free()</a>.</p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga94d7565c5fe50fec961d4f3f4fdbd241">cx_map_delete()</a>, and <a class="el" href="group__cxmultimap.html#gab91edddb80f050169933450acf0be4d2">cx_multimap_delete()</a>.</p>

</div>
</div>
<a class="anchor" id="ga148c828066a5d05e95acd4ec3a525bc8"></a><!-- doxytag: member="cxtree.c::cx_tree_empty" ref="ga148c828066a5d05e95acd4ec3a525bc8" args="(const cx_tree *tree)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cxbool <a class="el" href="group__cxtree.html#ga148c828066a5d05e95acd4ec3a525bc8">cx_tree_empty</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check whether a tree is empty. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The function returns <code>TRUE</code> if the tree is empty, and <code>FALSE</code> otherwise.</dd></dl>
<p>The function checks if the tree contains any pairs. Calling this function is equivalent to the statement: </p>
<div class="fragment"><pre class="fragment">   <span class="keywordflow">return</span> (<a class="code" href="group__cxtree.html#ga3cc3eec66e54e3292d3354ffd2076696" title="Get the actual number of pairs in the tree.">cx_tree_size</a>(tree) == 0);
</pre></div> 
<p>Referenced by <a class="el" href="group__cxmap.html#gacd5d5b06a038b9746538291395432627">cx_map_empty()</a>, and <a class="el" href="group__cxmultimap.html#ga51fe454733ae3155f12a2b4f1242eae6">cx_multimap_empty()</a>.</p>

</div>
</div>
<a class="anchor" id="gadff64dc3840bb3d663e6b93b89e52d1e"></a><!-- doxytag: member="cxtree.c::cx_tree_end" ref="gadff64dc3840bb3d663e6b93b89e52d1e" args="(const cx_tree *tree)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cx_tree_iterator <a class="el" href="group__cxtree.html#gadff64dc3840bb3d663e6b93b89e52d1e">cx_tree_end</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get an iterator for the position after the last pair in the tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>The tree to query.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Iterator for the end of the tree.</dd></dl>
<p>The function returns an iterator for the position one past the last pair in the tree <em>tree</em>. The iteration is done in ascending order according to the keys. The returned iterator cannot be used directly to access the value field of the key/value pair, but only through the appropriate methods. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga11cb14ad033e85525ded6dc92d093499">cx_map_count()</a>, <a class="el" href="group__cxmap.html#gae5dd15139b587d10b5cb7a15128b880e">cx_map_end()</a>, <a class="el" href="group__cxmap.html#ga6dc8172e04dcf5589b00f1c6cc49207c">cx_map_get()</a>, <a class="el" href="group__cxmap.html#gaeb1c59ace3e10f9588616d0b9ea7fbfc">cx_map_put()</a>, and <a class="el" href="group__cxmultimap.html#ga0664926c1144abc42ff45630398cff3b">cx_multimap_end()</a>.</p>

</div>
</div>
<a class="anchor" id="ga9db4e043848ab20c0111b9a1b081593a"></a><!-- doxytag: member="cxtree.c::cx_tree_equal_range" ref="ga9db4e043848ab20c0111b9a1b081593a" args="(const cx_tree *tree, cxcptr key, cx_tree_iterator *begin, cx_tree_iterator *end)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__cxtree.html#ga9db4e043848ab20c0111b9a1b081593a">cx_tree_equal_range</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cxcptr&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_tree_iterator *&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_tree_iterator *&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Find a subsequence matching a given key. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">key</td><td>The key of the (key, value) pair(s) to be located. </td></tr>
    <tr><td class="paramname">begin</td><td>First element with key <em>key</em>. </td></tr>
    <tr><td class="paramname">end</td><td>Last element with key <em>key</em>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing.</dd></dl>
<p>The function returns the beginning and the end of a subsequence of tree elements with the key <em>key</em> through through the <em>begin</em> and <em>end</em> arguments. After calling this function <em>begin</em> possibly points to the first element of <em>tree</em> matching the key <em>key</em> and <em>end</em> possibly points to the last element of the sequence. If key is not present in the tree <em>begin</em> points to the next greater element or, if no such element exists, to <b><a class="el" href="group__cxtree.html#gadff64dc3840bb3d663e6b93b89e52d1e" title="Get an iterator for the position after the last pair in the tree.">cx_tree_end()</a></b>. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga61e396d53f3fe4f3a28f906e59e02dfb">cx_map_equal_range()</a>, and <a class="el" href="group__cxmultimap.html#ga084d0d468f5f6074113f60a5560dce34">cx_multimap_equal_range()</a>.</p>

</div>
</div>
<a class="anchor" id="ga14027eafaeb3eaddd513b839672c5e92"></a><!-- doxytag: member="cxtree.c::cx_tree_erase" ref="ga14027eafaeb3eaddd513b839672c5e92" args="(cx_tree *tree, cxcptr key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cxsize <a class="el" href="group__cxtree.html#ga14027eafaeb3eaddd513b839672c5e92">cx_tree_erase</a> </td>
          <td>(</td>
          <td class="paramtype">cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cxcptr&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Erase all elements from a tree matching the provided key. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">key</td><td>Key of the element to be erased.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of removed elements.</dd></dl>
<p>This function erases all elements with the specified key <em>key</em>, from <em>tree</em>. Key and value associated with the erased pairs are deallocated using the tree's key and value destructors, provided they have been set. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#gae9a58e7a005280bdd0ba8a67b2c46c89">cx_map_erase()</a>, and <a class="el" href="group__cxmultimap.html#ga4445b5eb32f7452f56a0045dda373f94">cx_multimap_erase()</a>.</p>

</div>
</div>
<a class="anchor" id="gaea5f45961ba5ab503c751f54810e8258"></a><!-- doxytag: member="cxtree.c::cx_tree_erase_position" ref="gaea5f45961ba5ab503c751f54810e8258" args="(cx_tree *tree, cx_tree_iterator position)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__cxtree.html#gaea5f45961ba5ab503c751f54810e8258">cx_tree_erase_position</a> </td>
          <td>(</td>
          <td class="paramtype">cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_tree_iterator&#160;</td>
          <td class="paramname"><em>position</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Erase an element from a tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">position</td><td>Iterator position of the element to be erased.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing.</dd></dl>
<p>This function erases an element, specified by the iterator <em>position</em>, from <em>tree</em>. Key and value associated with the erased pair are deallocated using the tree's key and value destructors, provided they have been set. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga3b5fb17aeafdff4b2cd5a660b06e80fe">cx_map_erase_position()</a>, and <a class="el" href="group__cxmultimap.html#gace135776d124d74eada48b654abcfe04">cx_multimap_erase_position()</a>.</p>

</div>
</div>
<a class="anchor" id="gae573050dfd0d7cc829844609ff4a1dc2"></a><!-- doxytag: member="cxtree.c::cx_tree_erase_range" ref="gae573050dfd0d7cc829844609ff4a1dc2" args="(cx_tree *tree, cx_tree_iterator begin, cx_tree_iterator end)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__cxtree.html#gae573050dfd0d7cc829844609ff4a1dc2">cx_tree_erase_range</a> </td>
          <td>(</td>
          <td class="paramtype">cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_tree_iterator&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_tree_iterator&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Erase a range of elements from a tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">begin</td><td>Iterator pointing to the start of the range to erase. </td></tr>
    <tr><td class="paramname">end</td><td>Iterator pointing to the end of the range to erase.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing.</dd></dl>
<p>This function erases all elements in the range [begin, end) from the tree <em>tree</em>. Key and value associated with the erased pair(s) are deallocated using the tree's key and value destructors, provided they have been set. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga284d85c6de2206aaf7ff60a6667ce084">cx_map_erase_range()</a>, and <a class="el" href="group__cxmultimap.html#ga567a2280d596e10e11c4806fe8df99f5">cx_multimap_erase_range()</a>.</p>

</div>
</div>
<a class="anchor" id="gaa36076ac9467d17c8655a9a94a5f7a44"></a><!-- doxytag: member="cxtree.c::cx_tree_find" ref="gaa36076ac9467d17c8655a9a94a5f7a44" args="(const cx_tree *tree, cxcptr key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cx_tree_iterator <a class="el" href="group__cxtree.html#gaa36076ac9467d17c8655a9a94a5f7a44">cx_tree_find</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cxcptr&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Locate an element in the tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">key</td><td>Key of the (key, value) pair to locate.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Iterator pointing to the sought-after element, or <b><a class="el" href="group__cxtree.html#gadff64dc3840bb3d663e6b93b89e52d1e" title="Get an iterator for the position after the last pair in the tree.">cx_tree_end()</a></b> if it was not found.</dd></dl>
<p>The function searches the tree <em>tree</em> for an element with a key matching <em>key</em>. If the search was successful an iterator to the sought-after pair is returned. If the search did not succeed, i.e. <em>key</em> is not present in the tree, a one past the end iterator is returned. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga11cb14ad033e85525ded6dc92d093499">cx_map_count()</a>, <a class="el" href="group__cxmap.html#gaacefcf33145d47dcb9439c23b07be5fa">cx_map_find()</a>, and <a class="el" href="group__cxmultimap.html#gada385132d40cf231aa6e2c7da61ebd4e">cx_multimap_find()</a>.</p>

</div>
</div>
<a class="anchor" id="ga5578369c1a53b8592ff83032c6780cfb"></a><!-- doxytag: member="cxtree.c::cx_tree_get_key" ref="ga5578369c1a53b8592ff83032c6780cfb" args="(const cx_tree *tree, cx_tree_const_iterator position)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cxptr <a class="el" href="group__cxtree.html#ga5578369c1a53b8592ff83032c6780cfb">cx_tree_get_key</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_tree_const_iterator&#160;</td>
          <td class="paramname"><em>position</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the key from a given iterator position. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">position</td><td>Iterator position the data is retrieved from.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference for the key.</dd></dl>
<p>The function returns a reference to the key associated with the iterator position <em>position</em> in the tree <em>tree</em>.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>One must not modify the key of <em>position</em> through the returned reference, since this might corrupt the tree! </dd></dl>

<p>Referenced by <a class="el" href="group__cxmap.html#ga6dc8172e04dcf5589b00f1c6cc49207c">cx_map_get()</a>, <a class="el" href="group__cxmap.html#gaac55eccdca3ef107f4b76f5a7a57fca0">cx_map_get_key()</a>, and <a class="el" href="group__cxmultimap.html#gaca42be4a86255128ff7fbd9d060422b7">cx_multimap_get_key()</a>.</p>

</div>
</div>
<a class="anchor" id="ga4b15b6abafbb4f528b5a1f0090b48f86"></a><!-- doxytag: member="cxtree.c::cx_tree_get_value" ref="ga4b15b6abafbb4f528b5a1f0090b48f86" args="(const cx_tree *tree, cx_tree_const_iterator position)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cxptr <a class="el" href="group__cxtree.html#ga4b15b6abafbb4f528b5a1f0090b48f86">cx_tree_get_value</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_tree_const_iterator&#160;</td>
          <td class="paramname"><em>position</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the data from a given iterator position. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">position</td><td>Iterator position the data is retrieved from.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Handle for the data object.</dd></dl>
<p>The function returns a reference to the data stored at iterator position <em>position</em> in the tree <em>tree</em>. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga6dc8172e04dcf5589b00f1c6cc49207c">cx_map_get()</a>, <a class="el" href="group__cxmap.html#gad6088581b6b73fd905bc37abffab2edf">cx_map_get_value()</a>, and <a class="el" href="group__cxmultimap.html#gad6457c9e3b6c522352d9500fd23ff634">cx_multimap_get_value()</a>.</p>

</div>
</div>
<a class="anchor" id="ga07b038bf6018884fa92a5aa316e4cb66"></a><!-- doxytag: member="cxtree.c::cx_tree_insert_equal" ref="ga07b038bf6018884fa92a5aa316e4cb66" args="(cx_tree *tree, cxcptr key, cxcptr data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cx_tree_iterator <a class="el" href="group__cxtree.html#ga07b038bf6018884fa92a5aa316e4cb66">cx_tree_insert_equal</a> </td>
          <td>(</td>
          <td class="paramtype">cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cxcptr&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cxcptr&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Insert data into a tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">key</td><td>Key used to store the data. </td></tr>
    <tr><td class="paramname">data</td><td>Data to insert.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An iterator that points to the inserted pair.</dd></dl>
<p>This function inserts a (key, value) pair into the tree <em>tree</em>. Contrary to <b><a class="el" href="group__cxtree.html#ga1f8f15e701fd1eb4ebe15639aea354e3" title="Attempt to insert data into a tree.">cx_tree_insert_unique()</a></b> the key <em>key</em> used for inserting <em>data</em> may already be present in the tree. </p>

<p>Referenced by <a class="el" href="group__cxmultimap.html#ga6281914a4c8a9b5582758b4e90c527b4">cx_multimap_insert()</a>.</p>

</div>
</div>
<a class="anchor" id="ga1f8f15e701fd1eb4ebe15639aea354e3"></a><!-- doxytag: member="cxtree.c::cx_tree_insert_unique" ref="ga1f8f15e701fd1eb4ebe15639aea354e3" args="(cx_tree *tree, cxcptr key, cxcptr data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cx_tree_iterator <a class="el" href="group__cxtree.html#ga1f8f15e701fd1eb4ebe15639aea354e3">cx_tree_insert_unique</a> </td>
          <td>(</td>
          <td class="paramtype">cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cxcptr&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cxcptr&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Attempt to insert data into a tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">key</td><td>Key used to store the data. </td></tr>
    <tr><td class="paramname">data</td><td>Data to insert.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An iterator that points to the inserted pair, or <code>NULL</code> if the pair could not be inserted.</dd></dl>
<p>This function attempts to insert a (key, value) pair into the tree <em>tree</em>. The insertion fails if the key already present in the tree, i.e. if the key is not unique. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga6dc8172e04dcf5589b00f1c6cc49207c">cx_map_get()</a>, <a class="el" href="group__cxmap.html#gaaf6b77fe3fc775b2fc29bc435e6130b0">cx_map_insert()</a>, and <a class="el" href="group__cxmap.html#gaeb1c59ace3e10f9588616d0b9ea7fbfc">cx_map_put()</a>.</p>

</div>
</div>
<a class="anchor" id="ga40f1e3c1aff10f23fa128187f37f30ce"></a><!-- doxytag: member="cxtree.c::cx_tree_key_comp" ref="ga40f1e3c1aff10f23fa128187f37f30ce" args="(const cx_tree *tree)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__cxtree.html#ga9fe906309049ab24e407cd25fcd22f17">cx_tree_compare_func</a> <a class="el" href="group__cxtree.html#ga40f1e3c1aff10f23fa128187f37f30ce">cx_tree_key_comp</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the key comparison function. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>The tree to query.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Handle for the tree's key comparison function.</dd></dl>
<p>The function retrieves the function used by the tree methods for comparing keys. The key comparison function is set during tree creation.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__cxtree.html#ga4d5b89c5e8709645b85996d05478d71e" title="Create a new tree without any elements.">cx_tree_new()</a> </dd></dl>

<p>Referenced by <a class="el" href="group__cxmap.html#ga6dc8172e04dcf5589b00f1c6cc49207c">cx_map_get()</a>, <a class="el" href="group__cxmap.html#ga4d8fbf9375ffab6b66ef27cbee11a015">cx_map_key_comp()</a>, and <a class="el" href="group__cxmultimap.html#gababd9f0e9931b1719e7ccadb41c96c26">cx_multimap_key_comp()</a>.</p>

</div>
</div>
<a class="anchor" id="ga22e4896d6cd7486dc6d73eb7c3a56fea"></a><!-- doxytag: member="cxtree.c::cx_tree_lower_bound" ref="ga22e4896d6cd7486dc6d73eb7c3a56fea" args="(const cx_tree *tree, cxcptr key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cx_tree_iterator <a class="el" href="group__cxtree.html#ga22e4896d6cd7486dc6d73eb7c3a56fea">cx_tree_lower_bound</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cxcptr&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Find the beginning of a subsequence. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">key</td><td>Key of the (key, value) pair(s) to locate.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Iterator pointing to the first position where an element with key <em>key</em> would get inserted, i.e. the first element with a key greater or equal than <em>key</em>.</dd></dl>
<p>The function returns the first element of a subsequence of elements in the tree that match the given key <em>key</em>. If <em>key</em> is not present in the tree <em>tree</em> an iterator pointing to the first element that has a greater key than <em>key</em> or <b><a class="el" href="group__cxtree.html#gadff64dc3840bb3d663e6b93b89e52d1e" title="Get an iterator for the position after the last pair in the tree.">cx_tree_end()</a></b> if no such element exists. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga6dc8172e04dcf5589b00f1c6cc49207c">cx_map_get()</a>, <a class="el" href="group__cxmap.html#ga75110aefe5bdddd1b3ab03d752d8e22b">cx_map_lower_bound()</a>, <a class="el" href="group__cxmap.html#gaeb1c59ace3e10f9588616d0b9ea7fbfc">cx_map_put()</a>, and <a class="el" href="group__cxmultimap.html#ga7b8519646c0823f93349524ca64944fe">cx_multimap_lower_bound()</a>.</p>

</div>
</div>
<a class="anchor" id="ga2a04a36bb3a449f14efa25e784169b57"></a><!-- doxytag: member="cxtree.c::cx_tree_max_size" ref="ga2a04a36bb3a449f14efa25e784169b57" args="(const cx_tree *tree)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cxsize <a class="el" href="group__cxtree.html#ga2a04a36bb3a449f14efa25e784169b57">cx_tree_max_size</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the maximum number of pairs possible. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The maximum number of pairs that can be stored in the tree.</dd></dl>
<p>Retrieves the tree's capacity, i.e. the maximum possible number of pairs a tree can manage. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga81cb88ef79b84e82c362b09a78319fbe">cx_map_max_size()</a>, and <a class="el" href="group__cxmultimap.html#ga5cb5a94c2aa80f245c6c29f32786830e">cx_multimap_max_size()</a>.</p>

</div>
</div>
<a class="anchor" id="ga4d5b89c5e8709645b85996d05478d71e"></a><!-- doxytag: member="cxtree.c::cx_tree_new" ref="ga4d5b89c5e8709645b85996d05478d71e" args="(cx_tree_compare_func compare, cx_free_func key_destroy, cx_free_func value_destroy)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cx_tree* <a class="el" href="group__cxtree.html#ga4d5b89c5e8709645b85996d05478d71e">cx_tree_new</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__cxtree.html#ga9fe906309049ab24e407cd25fcd22f17">cx_tree_compare_func</a>&#160;</td>
          <td class="paramname"><em>compare</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_free_func&#160;</td>
          <td class="paramname"><em>key_destroy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_free_func&#160;</td>
          <td class="paramname"><em>value_destroy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a new tree without any elements. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">compare</td><td>Function used to compare keys. </td></tr>
    <tr><td class="paramname">key_destroy</td><td>Destructor for the keys. </td></tr>
    <tr><td class="paramname">value_destroy</td><td>Destructor for the value field.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Handle for the newly allocated tree.</dd></dl>
<p>Memory for a new tree is allocated and the tree is initialized to be a valid empty tree.</p>
<p>The tree's key comparison function is set to <em>compare</em>. It must return <code>TRUE</code> or <code>FALSE</code> if the comparison of the first argument passed to it with the second argument is found to be true or false respectively.</p>
<p>The destructors for a tree node's key and value field are set to <em>key_destroy</em> and <em>value_destroy</em>. Whenever a tree node is destroyed these functions are used to deallocate the memory used by the key and the value. Each of the destructors might be <code>NULL</code>, i.e. keys and values are not deallocated during destroy operations.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__cxtree.html#ga9fe906309049ab24e407cd25fcd22f17" title="The tree&#39;s key comparison operator function.">cx_tree_compare_func()</a> </dd></dl>

<p>References <a class="el" href="group__cxmemory.html#ga7ae1df2916d7231b1959cebcf4acafab">cx_malloc()</a>.</p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga6e539ee5ac510a3000d9984ce72d21f8">cx_map_new()</a>, and <a class="el" href="group__cxmultimap.html#ga2f7489b10291e6dbf257974f33fe00ad">cx_multimap_new()</a>.</p>

</div>
</div>
<a class="anchor" id="ga86c1d604b075a32860f0f66cf678267c"></a><!-- doxytag: member="cxtree.c::cx_tree_next" ref="ga86c1d604b075a32860f0f66cf678267c" args="(const cx_tree *tree, cx_tree_const_iterator position)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cx_tree_iterator <a class="el" href="group__cxtree.html#ga86c1d604b075a32860f0f66cf678267c">cx_tree_next</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_tree_const_iterator&#160;</td>
          <td class="paramname"><em>position</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get an iterator for the next pair in the tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">position</td><td>Current iterator position.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Iterator for the pair immediately following <em>position</em>.</dd></dl>
<p>The function returns an iterator for the next pair in the tree <em>tree</em> with respect to the current iterator position <em>position</em>. Iteration is done in ascending order according to the keys. If the tree is empty or <em>position</em> points to the end of the tree the function returns <b><a class="el" href="group__cxtree.html#gadff64dc3840bb3d663e6b93b89e52d1e" title="Get an iterator for the position after the last pair in the tree.">cx_tree_end()</a></b>. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga0f33e89b70fefdb79b99467aba18587d">cx_map_next()</a>, and <a class="el" href="group__cxmultimap.html#ga3e4675ececca240fd93a696273d94fd0">cx_multimap_next()</a>.</p>

</div>
</div>
<a class="anchor" id="ga7a7a6770d510c426f281fa9d46e1be5e"></a><!-- doxytag: member="cxtree.c::cx_tree_previous" ref="ga7a7a6770d510c426f281fa9d46e1be5e" args="(const cx_tree *tree, cx_tree_const_iterator position)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cx_tree_iterator <a class="el" href="group__cxtree.html#ga7a7a6770d510c426f281fa9d46e1be5e">cx_tree_previous</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_tree_const_iterator&#160;</td>
          <td class="paramname"><em>position</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get an iterator for the previous pair in the tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">position</td><td>Current iterator position.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Iterator for the pair immediately preceding <em>position</em>.</dd></dl>
<p>The function returns an iterator for the previous pair in the tree <em>tree</em> with respect to the current iterator position <em>position</em>. Iteration is done in ascending order according to the keys. If the tree is empty or <em>position</em> points to the beginning of the tree the function returns <b><a class="el" href="group__cxtree.html#gadff64dc3840bb3d663e6b93b89e52d1e" title="Get an iterator for the position after the last pair in the tree.">cx_tree_end()</a></b>. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga6f6382072295b03f41686716486bb4d3">cx_map_previous()</a>, and <a class="el" href="group__cxmultimap.html#ga436f55eebc0e96500579067a898361eb">cx_multimap_previous()</a>.</p>

</div>
</div>
<a class="anchor" id="ga3cc3eec66e54e3292d3354ffd2076696"></a><!-- doxytag: member="cxtree.c::cx_tree_size" ref="ga3cc3eec66e54e3292d3354ffd2076696" args="(const cx_tree *tree)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cxsize <a class="el" href="group__cxtree.html#ga3cc3eec66e54e3292d3354ffd2076696">cx_tree_size</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the actual number of pairs in the tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The current number of pairs, or 0 if the tree is empty.</dd></dl>
<p>Retrieves the current number of pairs stored in the tree. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#ga307c8c94ef5f053f32fd3e2ba91d74c0">cx_map_size()</a>, and <a class="el" href="group__cxmultimap.html#gac5829ebe763fb7cfbfa895560e773dd0">cx_multimap_size()</a>.</p>

</div>
</div>
<a class="anchor" id="gaf79317c9c323f0d7b1903b7f23c1012e"></a><!-- doxytag: member="cxtree.c::cx_tree_swap" ref="gaf79317c9c323f0d7b1903b7f23c1012e" args="(cx_tree *tree1, cx_tree *tree2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__cxtree.html#gaf79317c9c323f0d7b1903b7f23c1012e">cx_tree_swap</a> </td>
          <td>(</td>
          <td class="paramtype">cx_tree *&#160;</td>
          <td class="paramname"><em>tree1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cx_tree *&#160;</td>
          <td class="paramname"><em>tree2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Swap the contents of two trees. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree1</td><td>First tree. </td></tr>
    <tr><td class="paramname">tree2</td><td>Second tree.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Nothing.</dd></dl>
<p>All pairs stored in the first tree <em>tree1</em> are moved to the second tree <em>tree2</em>, while the pairs from <em>tree2</em> are moved to <em>tree1</em>. Also the key comparison function, the key and the value destructor are exchanged. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#gac480f53fd51f8e04b79ec92d1fe8e586">cx_map_swap()</a>, and <a class="el" href="group__cxmultimap.html#ga9007e9259934869c4bd71156b1b038dc">cx_multimap_swap()</a>.</p>

</div>
</div>
<a class="anchor" id="ga410dcaddb7845533076d98466f51c053"></a><!-- doxytag: member="cxtree.c::cx_tree_upper_bound" ref="ga410dcaddb7845533076d98466f51c053" args="(const cx_tree *tree, cxcptr key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cx_tree_iterator <a class="el" href="group__cxtree.html#ga410dcaddb7845533076d98466f51c053">cx_tree_upper_bound</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">cxcptr&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Find the end of a subsequence. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>A tree. </td></tr>
    <tr><td class="paramname">key</td><td>Key of the (key, value) pair(s) to locate.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Iterator pointing to the last position where an element with key <em>key</em> would get inserted, i.e. the first element with a key greater than <em>key</em>.</dd></dl>
<p>The function returns the last element of a subsequence of elements in the tree that match the given key <em>key</em>. If <em>key</em> is not present in the tree <em>tree</em> an iterator pointing to the first element that has a greater key than <em>key</em> or <b><a class="el" href="group__cxtree.html#gadff64dc3840bb3d663e6b93b89e52d1e" title="Get an iterator for the position after the last pair in the tree.">cx_tree_end()</a></b> if no such element exists. </p>

<p>Referenced by <a class="el" href="group__cxmap.html#gaa3cf57d1d4fc024a1d87dbae9807c209">cx_map_upper_bound()</a>, and <a class="el" href="group__cxmultimap.html#ga921040ae538ae0f1d3de3ec28f7bf151">cx_multimap_upper_bound()</a>.</p>

</div>
</div>
<a class="anchor" id="gaba9a431c2237e6b98584dd47052f8529"></a><!-- doxytag: member="cxtree.c::cx_tree_verify" ref="gaba9a431c2237e6b98584dd47052f8529" args="(const cx_tree *tree)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cxbool <a class="el" href="group__cxtree.html#gaba9a431c2237e6b98584dd47052f8529">cx_tree_verify</a> </td>
          <td>(</td>
          <td class="paramtype">const cx_tree *&#160;</td>
          <td class="paramname"><em>tree</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Validate a tree. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>The tree to verify.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns <code>TRUE</code> if the tree is valid, or <code>FALSE</code> otherwise.</dd></dl>
<p>The function is provided for debugging purposes. It verifies that the internal tree structure of <em>tree</em> is valid. </p>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Thu Dec 29 2011 09:56:14 for C Standard Library Extensions by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>