intrusive red black tree datastructure
- Author
- Leona Gottwald
Definition in file rbtree.h.
|
#define | SCIP_RBTREE_HOOKS SCIP_RBTREENODE _rbtreenode |
|
#define | SCIPrbtreeFirst(root) SCIPrbtreeFirst_call((SCIP_RBTREENODE*)(root)) |
|
#define | SCIPrbtreeLast(root) SCIPrbtreeLast_call((SCIP_RBTREENODE*)(root)) |
|
#define | SCIPrbtreeSuccessor(x) SCIPrbtreeSuccessor_call((SCIP_RBTREENODE*)(x)) |
|
#define | SCIPrbtreePredecessor(x) SCIPrbtreePredecessor_call((SCIP_RBTREENODE*)(x)) |
|
#define | SCIPrbtreeDelete(root, node) SCIPrbtreeDelete_call((SCIP_RBTREENODE**)(root), (SCIP_RBTREENODE*)(node)) |
|
#define | SCIPrbtreeInsert(r, p, c, n) SCIPrbtreeInsert_call((SCIP_RBTREENODE**)(r), (SCIP_RBTREENODE*)(p), (c), (SCIP_RBTREENODE*)(n) ) |
|
#define | SCIPrbtreeFindInt(r, k, n) SCIPrbtreeFindInt_call((SCIP_RBTREENODE*)(r),(k),(SCIP_RBTREENODE**)(n)) |
|
#define | SCIPrbtreeFindReal(r, k, n) SCIPrbtreeFindReal_call((SCIP_RBTREENODE*)(r),(k),(SCIP_RBTREENODE**)(n)) |
|
#define | SCIPrbtreeFindPtr(c, r, k, n) SCIPrbtreeFindPtr_call((c),(SCIP_RBTREENODE*)(r),(void*)(k),(SCIP_RBTREENODE**)(n)) |
|
#define | SCIPrbtreeFindElem(c, r, k, n) SCIPrbtreeFindElem_call((c),(SCIP_RBTREENODE*)(r),(SCIP_RBTREENODE*)(k),(SCIP_RBTREENODE**)(n)) |
|
#define | FOR_EACH_NODE(type, n, r, body) |
|
#define | SCIP_DEF_RBTREE_FIND(NAME, KEYTYPE, NODETYPE, LT, GT) |
|
delete the given node from the tree given by it's root node. The node must be contained in the tree rooted at root.
- Parameters
-
root | root of the tree |
node | node to delete from tree |
Definition at line 297 of file rbtree.c.
References BLACK, SCIP_RBTreeNode::child, COLOR, LEFT, NULL, PARENT, SCIP_RBTreeNode::parent, rbDeleteFixup(), rbTransplant(), RIGHT, SCIPrbtreeFirst, SET_COLOR, SET_PARENT, x, and y.
insert node into the tree given by it's root. Requires the future parent and the position of the parent as returned by the tree's find function defined using the SCIP_DEF_RBTREE_FIND macro.
- Parameters
-
root | root of the tree |
parent | future parent of node to be inserted |
pos | position of parent with respect to node, i.e. -1 if the parent's key comes before node and 1 if the parent's key comes after the node |
node | node to insert into the tree |
Definition at line 352 of file rbtree.c.
References SCIP_RBTreeNode::child, LEFT, NULL, SCIP_RBTreeNode::parent, rbInsertFixup(), RED, and RIGHT.