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

Function TransformToTree

libs/indexer/complex/tree_node.hpp:186–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184
185template <typename Data, typename Fn>
186types::Ptr<typename std::invoke_result<Fn, Data const &>::type> TransformToTree(types::Ptr<Data> const & node, Fn && fn)
187{
188 auto n = MakeTreeNode(fn(node->GetData()));
189 for (auto const & ch : node->GetChildren())
190 n->AddChild(TransformToTree(ch, fn));
191 return n;
192}
193
194template <typename Data>
195bool IsEqual(types::Ptr<Data> const & lhs, types::Ptr<Data> const & rhs)

Callers 2

TraformToIdsForestFunction · 0.85
UNIT_TESTFunction · 0.85

Calls 4

MakeTreeNodeFunction · 0.85
GetChildrenMethod · 0.80
GetDataMethod · 0.45
AddChildMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.68