MCPcopy Create free account
hub / github.com/biometrics/openbr / loadRecursive

Function loadRecursive

openbr/plugins/classification/boostedforest.cpp:42–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42static void loadRecursive(QDataStream &stream, Node *node, int maxCatCount)
43{
44 bool hasChildren; stream >> hasChildren;
45
46 if (!hasChildren) {
47 stream >> node->value;
48 node->left = node->right = NULL;
49 } else {
50 if (maxCatCount > 0)
51 for (int i = 0; i < (maxCatCount + 31)/32; i++) {
52 int s; stream >> s; node->subset.append(s);
53 }
54 else
55 stream >> node->threshold;
56
57 stream >> node->featureIdx;
58
59 node->left = new Node; node->right = new Node;
60 loadRecursive(stream, node->left, maxCatCount);
61 loadRecursive(stream, node->right, maxCatCount);
62 }
63}
64
65static void storeRecursive(QDataStream &stream, const Node *node, int maxCatCount)
66{

Callers 1

boostedforest.cppFile · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected