/* *RBTNodeisintendedtobeusedasthefirstfieldofalargerstruct, *whoseadditionalfieldscarrywhateverpayloaddatathecallerneeds *foratreeentry.(Thetotalsizeofthatlargerstructispassedto *rbt_create.)RBTNodeisdeclaredheretosupportthisusage,but *callersmusttreatitasanopaquestruct.
*/ typedefstruct RBTNode
{ char color; /* node's current color, red or black */ struct RBTNode *left; /* left child, or RBTNIL if none */ struct RBTNode *right; /* right child, or RBTNIL if none */ struct RBTNode *parent; /* parent, or NULL (not RBTNIL!) if none */
} RBTNode;
/* Opaque struct representing a whole tree */ typedefstruct RBTree RBTree;
/* Available tree iteration orderings */ typedefenum RBTOrderControl
{
LeftRightWalk, /* inorder: left child, node, right child */
RightLeftWalk /* reverse inorder: right, node, left */
} RBTOrderControl;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.