MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / calculate_depth

Function calculate_depth

cp-profiler/src/cpprofiler/utils/tree_utils.cpp:31–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31int calculate_depth(const NodeTree &nt, NodeID nid)
32{
33 int depth = 0;
34 while (nid != NodeID::NoNode)
35 {
36 nid = nt.getParent(nid);
37 ++depth;
38 }
39 return depth;
40}
41
42std::vector<NodeID> nodes_below(const tree::NodeTree &nt, NodeID nid)
43{

Callers 3

centerNodeMethod · 0.85
db_addChildMethod · 0.85
promoteNodeMethod · 0.85

Calls 1

getParentMethod · 0.45

Tested by

no test coverage detected