* Recursively transverse the tree in a depth first way, * and fill all row of frame at the same time */
| 760 | * and fill all row of frame at the same time |
| 761 | */ |
| 762 | void 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 |
no test coverage detected