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

Method get_path

Data Structures/Top Tree.cpp:457–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455 }
456
457 friend top_tree_node* get_path(top_tree_node* a, top_tree_node* b) {
458 assert(a->is_vert && b->is_vert);
459 a->make_root();
460 b->expose();
461 if (a == b) {
462 assert(!b->p);
463 return b;
464 }
465 assert(!b->p->p);
466 return b->p;
467 }
468
469 friend top_tree_node* get_subtree(top_tree_node* rt, top_tree_node* n) {
470 rt->make_root();

Callers

nothing calls this directly

Calls 2

exposeMethod · 0.80
make_rootMethod · 0.45

Tested by

no test coverage detected