MCPcopy Create free account
hub / github.com/apache/madlib / transverse_tree

Function transverse_tree

src/modules/recursive_partitioning/decision_tree.cpp:762–769  ·  view source on GitHub ↗

* Recursively transverse the tree in a depth first way, * and fill all row of frame at the same time */

Source from the content-addressed store, hash-verified

760 * and fill all row of frame at the same time
761 */
762void transverse_tree(Tree &dt, MutableNativeMatrix &frame,
763 int me, int &row, int n_cats) {
764 if (me < dt.feature_indices.size() && dt.feature_indices(me) != dt.NODE_NON_EXISTING) {
765 fill_row(frame, dt, me, row++, n_cats);
766 transverse_tree(dt, frame, static_cast<int>(dt.falseChild(me)), row, n_cats);
767 transverse_tree(dt, frame, static_cast<int>(dt.trueChild(me)), row, n_cats);
768 }
769}
770
771// ------------------------------------------------------------
772

Callers 1

runMethod · 0.85

Calls 4

fill_rowFunction · 0.85
falseChildMethod · 0.80
trueChildMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected