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

Method LeafCount

mlspp/src/tree_math.cpp:24–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace mlspp {
23
24LeafCount::LeafCount(const NodeCount w)
25{
26 if (w.val == 0) {
27 val = 0;
28 return;
29 }
30
31 if ((w.val & one) == 0) {
32 throw InvalidParameterError("Only odd node counts describe trees");
33 }
34
35 val = (w.val >> one) + 1;
36}
37
38LeafCount
39LeafCount::full(const LeafCount n)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected