MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / copath

Method copath

mlspp/src/tree_math.cpp:194–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194std::vector<NodeIndex>
195NodeIndex::copath(LeafCount n)
196{
197 auto d = dirpath(n);
198 if (d.empty()) {
199 return {};
200 }
201
202 // Prepend leaf; omit root
203 d.insert(d.begin(), *this);
204 d.pop_back();
205
206 return stdx::transform<NodeIndex>(d, [](auto x) { return x.sibling(); });
207}
208
209uint32_t
210NodeIndex::level() const

Callers 1

filtered_direct_pathMethod · 0.80

Calls 4

insertMethod · 0.80
siblingMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected