@param x the child @param y the parent
(FibNode<T> x, FibNode<T> y)
| 241 | * @param y the parent |
| 242 | */ |
| 243 | private void cut(FibNode<T> x, FibNode<T> y) |
| 244 | { |
| 245 | //1| remove x from the child list of y, decrementing y.degree |
| 246 | if(y.child == x)//if we removed but x was the child pointer, we would get messed up |
| 247 | y.child = delink(x); |
| 248 | else |
| 249 | delink(x); |
| 250 | y.degree--;//removal of 'x' from y |
| 251 | y.degree-= x.degree;//removal of everyone x owned from y |
| 252 | //2| add x to the root list of H |
| 253 | min = merge(min, x); |
| 254 | //3| x.p = NIL |
| 255 | x.p = null; |
| 256 | //4| x.mark = FALSE |
| 257 | x.mark = false; |
| 258 | } |
| 259 | |
| 260 | private void cascadingCut(FibNode<T> y) |
| 261 | { |
no test coverage detected