Implemented operator[] and at methods for KDTree