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

Function buildTreeRecursive

openbr/plugins/classification/boostedforest.cpp:22–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20};
21
22static void buildTreeRecursive(Node *node, const CvDTreeNode *cv_node, int maxCatCount)
23{
24 if (!cv_node->left) {
25 node->value = cv_node->value;
26 node->left = node->right = NULL;
27 } else {
28 if (maxCatCount > 0)
29 for (int i = 0; i < (maxCatCount + 31)/32; i++)
30 node->subset.append(cv_node->split->subset[i]);
31 else
32 node->threshold = cv_node->split->ord.c;
33
34 node->featureIdx = cv_node->split->var_idx;
35
36 node->left = new Node; node->right = new Node;
37 buildTreeRecursive(node->left, cv_node->left, maxCatCount);
38 buildTreeRecursive(node->right, cv_node->right, maxCatCount);
39 }
40}
41
42static void loadRecursive(QDataStream &stream, Node *node, int maxCatCount)
43{

Callers 1

boostedforest.cppFile · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected