MCPcopy Create free account
hub / github.com/comaps/comaps / GetDepth

Function GetDepth

libs/indexer/complex/tree_node.hpp:89–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87
88template <typename Data>
89size_t GetDepth(types::Ptr<Data> node)
90{
91 size_t depth = 0;
92 while (node)
93 {
94 node = node->GetParent();
95 ++depth;
96 }
97 return depth;
98}
99
100template <typename Data, typename Fn>
101void PreOrderVisit(types::Ptr<Data> const & node, Fn && fn)

Callers 4

TransformMethod · 0.85
UNIT_CLASS_TESTFunction · 0.85
TestDepthNodeByIdFunction · 0.85
UNIT_TESTFunction · 0.85

Calls 1

GetParentMethod · 0.45

Tested by 3

UNIT_CLASS_TESTFunction · 0.68
TestDepthNodeByIdFunction · 0.68
UNIT_TESTFunction · 0.68