| 260 | } |
| 261 | |
| 262 | void splay() { |
| 263 | assert(!is_vert); |
| 264 | while (!r()) { |
| 265 | if (!p->r()) { |
| 266 | if (p->d() == d()) { |
| 267 | p->rot(); |
| 268 | } else { |
| 269 | rot(); |
| 270 | } |
| 271 | } |
| 272 | rot(); |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | top_tree_node* cut_right() { |
| 277 | assert(is_vert && is_path); |
no test coverage detected