xgboost-predictor/src/main/java/biz/k11i/xgboost/tree/RegTreeImpl.java
@Override
    public int getLeafIndex(FVec feat, int root_id) {
        int pid = root_id;

        Node n;
        while (!(n = nodes[pid])._isLeaf) {
            pid = n.next(feat);
        }

        return pid;
    }
@Override
    public int getLeafIndex(FVec feat, int root_id) {
        int pid = root_id;

        Node n;
        while (!(n = nodes[pid])._isLeaf) {
            pid = n.next(feat);
        }

        return pid;
    }
Retrieves nodes from root to leaf and returns leaf index.

@param feat    feature vector
@param root_id starting root index
@return leaf index