code: @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;
      }
docs: Retrieves nodes from root to leaf and returns leaf index.
  
  @param feat    feature vector
  @param root_id starting root index
  @return leaf index