Lines Matching refs:balance
53 if ((*leaf)->balance != 0) {
56 * balance on the way, we know that we won't
59 * capable of keeping the subtree in balance.
84 result->balance = 0;
89 * have a balance of zero, meaning that these nodes will not get
90 * out of balance.
94 n->balance += 1;
97 n->balance -= 1;
103 * Adjusting the balances may have pushed the balance of the
105 * balance back in range.
108 if (x->balance > 1) {
110 if (y->balance < 0) {
129 x->balance = z->balance > 0 ? -1 : 0;
130 y->balance = z->balance < 0 ? 1 : 0;
131 z->balance = 0;
146 x->balance = 0;
147 y->balance = 0;
149 } else if (x->balance < -1) {
151 if (y->balance > 0) {
170 x->balance = z->balance < 0 ? 1 : 0;
171 y->balance = z->balance > 0 ? -1 : 0;
172 z->balance = 0;
187 x->balance = 0;
188 y->balance = 0;