public List<T> range(final double[] lowk,final double[] uppk) throws KeySizeException {
  if (lowk.length != uppk.length) {
    throw new KeySizeException();
  }
 else   if (lowk.length != m_K) {
    throw new KeySizeException();
  }
 else {
    final List<KDNode<T>> found=new LinkedList<KDNode<T>>();
    KDNode.rsearch(new HPoint(lowk),new HPoint(uppk),m_root,0,m_K,found);
    final List<T> o=new LinkedList<T>();
    for (    final KDNode<T> node : found) {
      o.add(node.v);
    }
    return o;
  }
}

public List < T > range ( final double [ ] lowk , final double [ ] uppk ) throws KeySizeException { if ( lowk . length != uppk . length ) { throw new KeySizeException ( ) ; } else if ( lowk . length != m_K ) { throw new KeySizeException ( ) ; } else { final List < KDNode < T > > found = new LinkedList < KDNode < T > > ( ) ; KDNode . rsearch ( new HPoint ( lowk ) , new HPoint ( uppk ) , m_root , 0 , m_K , found ) ; final List < T > o = new LinkedList < T > ( ) ; for ( final KDNode < T > node : found ) { o . add ( node . v ) ; } return o ; } }
range search in a kd - tree . uses algorithm translated from 352 . range . c of gonnet & baeza - yates .
