PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | RBTNode |
struct | RBTreeIterator |
Typedefs | |
typedef struct RBTNode | RBTNode |
typedef struct RBTree | RBTree |
typedef enum RBTOrderControl | RBTOrderControl |
typedef struct RBTreeIterator | RBTreeIterator |
typedef int(* | rbt_comparator) (const RBTNode *a, const RBTNode *b, void *arg) |
typedef void(* | rbt_combiner) (RBTNode *existing, const RBTNode *newdata, void *arg) |
typedef RBTNode *(* | rbt_allocfunc) (void *arg) |
typedef void(* | rbt_freefunc) (RBTNode *x, void *arg) |
Enumerations | |
enum | RBTOrderControl { LeftRightWalk , RightLeftWalk } |
Functions | |
RBTree * | rbt_create (Size node_size, rbt_comparator comparator, rbt_combiner combiner, rbt_allocfunc allocfunc, rbt_freefunc freefunc, void *arg) |
RBTNode * | rbt_find (RBTree *rbt, const RBTNode *data) |
RBTNode * | rbt_find_great (RBTree *rbt, const RBTNode *data, bool equal_match) |
RBTNode * | rbt_find_less (RBTree *rbt, const RBTNode *data, bool equal_match) |
RBTNode * | rbt_leftmost (RBTree *rbt) |
RBTNode * | rbt_insert (RBTree *rbt, const RBTNode *data, bool *isNew) |
void | rbt_delete (RBTree *rbt, RBTNode *node) |
void | rbt_begin_iterate (RBTree *rbt, RBTOrderControl ctrl, RBTreeIterator *iter) |
RBTNode * | rbt_iterate (RBTreeIterator *iter) |
typedef enum RBTOrderControl RBTOrderControl |
typedef struct RBTreeIterator RBTreeIterator |
enum RBTOrderControl |
void rbt_begin_iterate | ( | RBTree * | rbt, |
RBTOrderControl | ctrl, | ||
RBTreeIterator * | iter | ||
) |
Definition at line 802 of file rbtree.c.
References elog, ERROR, RBTreeIterator::is_over, RBTreeIterator::iterate, RBTreeIterator::last_visited, LeftRightWalk, RBTreeIterator::rbt, rbt_left_right_iterator(), rbt_right_left_iterator(), RBTNIL, RightLeftWalk, and RBTree::root.
Referenced by ginBeginBAScan(), testleftright(), and testrightleft().
RBTree* rbt_create | ( | Size | node_size, |
rbt_comparator | comparator, | ||
rbt_combiner | combiner, | ||
rbt_allocfunc | allocfunc, | ||
rbt_freefunc | freefunc, | ||
void * | arg | ||
) |
Definition at line 102 of file rbtree.c.
References arg, Assert, palloc(), RBTNIL, and tree.
Referenced by create_int_rbtree(), and ginInitBA().
Definition at line 695 of file rbtree.c.
References rbt_delete_node().
Referenced by testdelete(), and testfindltgt().
Definition at line 145 of file rbtree.c.
References RBTree::arg, cmp(), RBTree::comparator, data, RBTNode::left, RBTNIL, RBTNode::right, and RBTree::root.
Referenced by testdelete(), and testfind().
Definition at line 172 of file rbtree.c.
References RBTree::arg, cmp(), RBTree::comparator, data, RBTNode::left, RBTNIL, RBTNode::right, and RBTree::root.
Referenced by testfindltgt().
Definition at line 203 of file rbtree.c.
References RBTree::arg, cmp(), RBTree::comparator, data, RBTNode::left, RBTNIL, RBTNode::right, and RBTree::root.
Referenced by testfindltgt().
Definition at line 453 of file rbtree.c.
References RBTree::allocfunc, RBTree::arg, cmp(), RBTree::combiner, RBTree::comparator, data, RBTNode::left, rbt_copy_data(), rbt_insert_fixup(), RBTNIL, RBTRED, RBTNode::right, RBTree::root, and x.
Referenced by ginInsertBAEntry(), and rbt_populate().
RBTNode* rbt_iterate | ( | RBTreeIterator * | iter | ) |
Definition at line 826 of file rbtree.c.
References RBTreeIterator::is_over, and RBTreeIterator::iterate.
Referenced by ginGetBAEntry(), testleftright(), and testrightleft().
Definition at line 235 of file rbtree.c.
References RBTNode::left, RBTNIL, and RBTree::root.
Referenced by testdelete(), and testleftmost().