MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / make_root

Method make_root

Data Structures/Top Tree.cpp:402–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400 }
401
402 void make_root() {
403 expose();
404
405 top_tree_node* rt = this;
406 while (rt->p) {
407 assert(rt->d() == 1);
408 rt = rt->p;
409 }
410 rt->do_flip_path();
411 rt->meld_path_end();
412
413 expose();
414
415 assert(!p);
416 }
417
418 // link v2 as a child of v1 with edge e
419 friend void link(top_tree_node* e, top_tree_node* v1, top_tree_node* v2) {

Callers 4

linkMethod · 0.45
get_pathMethod · 0.45
get_subtreeMethod · 0.45
mainFunction · 0.45

Calls 3

dMethod · 0.80
do_flip_pathMethod · 0.80
meld_path_endMethod · 0.80

Tested by

no test coverage detected