**fig4_58.txt** /* 1*/ // Zig_Left which connects to parent if one exists. /* 2*/ template /* 3*/ void /* 4*/ Splay_Node:: /* 5*/ Zig_Left( Splay_Node * const X ) /* 6*/ { /* 7*/ Splay_Node *P = X->Parent; /* 8*/ Splay_Node *B = ( Splay_Node * ) X->Right; /* 9*/ X->Right = P; // X's new right child is P. /*10*/ X->Parent = P->Parent; /*11*/ if( B != NULL ) // P's newleft subtree is B. /*12*/ B->Parent = P; /*13*/ P->Left = B; /*14*/ P->Parent = X; /*15*/ if( X->Parent != NULL ) /*16*/ if( X->Parent->Left == P ) /*17*/ X->Parent->Left = X; /*18*/ else /*19*/ X->Parent->Right = X; /*20*/ }