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

Method LeafIndex

mlspp/src/tree_math.cpp:53–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53LeafIndex::LeafIndex(NodeIndex x)
54 : UInt32(0)
55{
56 if (x.val % 2 == 1) {
57 throw InvalidParameterError("Only even node indices describe leaves");
58 }
59
60 val = x.val >> 1; // NOLINT(hicpp-signed-bitwise)
61}
62
63NodeIndex
64LeafIndex::ancestor(LeafIndex other) const

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected