code: protected int rearrangePoints(int[] indices, final int startidx, final int endidx,
        			      final int splitDim, final double splitVal) {
      
      int tmp, left = startidx - 1;
      for (int i = startidx; i <= endidx; i++) {
        if (m_EuclideanDistance.valueIsSmallerEqual(m_Instances
            .instance(indices[i]), splitDim, splitVal)) {
          left++;
          tmp = indices[left];
          indices[left] = indices[i];
          indices[i] = tmp;
        }//end if valueIsSmallerEqual
      }//end for
      return left + 1;
    }
docs: Re-arranges the indices array such that the points <= to the splitVal
  are on the left of the array and those > the splitVal are on the right.
  
  @param indices The master index array.
  @param startidx The begining index of portion of indices that needs
  re-arranging.
  @param endidx The end index of portion of indices that needs
  re-arranging.
  @param splitDim The split dimension/attribute.
  @param splitVal The split value.
  @return The startIdx of the points > the splitVal (the points
  belonging to the right child of the node).