protected void copy_cover_sets(CoverTreeNode query_chi, MyHeap new_upper_k,
      		Stack<Stack<d_node>> cover_sets,
      		Stack<Stack<d_node>> new_cover_sets,
      		int current_scale, int max_scale) throws Exception {
    new_cover_sets.clear();
    for (; current_scale <= max_scale; current_scale++) {
      d_node ele;
      Stack<d_node> cover_set_currentscale = getCoverSet(current_scale,
          cover_sets);
      for (int i = 0; i < cover_set_currentscale.length; i++) { // ; ele != end;
                                                                // ele++) {
        ele = cover_set_currentscale.element(i);
        double upper_dist = new_upper_k.peek().distance + query_chi.max_dist
            + ele.n.max_dist;
        if (shell(ele.dist, query_chi.parent_dist, upper_dist)) {
          double d = Math.sqrt(m_DistanceFunction.distance(query_chi.p(), ele.n
              .p(), upper_dist * upper_dist));
          if (m_TreeStats != null)
            m_TreeStats.incrPointCount();
          if (d <= upper_dist) {
            if (d < new_upper_k.peek().distance)
              update(new_upper_k, d);
            d_node temp = new d_node(d, ele.n);
            new_cover_sets.element(current_scale).push(temp);
            if (m_TreeStats != null)
              m_TreeStats.incrIntNodeCount();
          }// end if(d<=..
        }// end if(shell(...
      }// end for(coverset_i)
    }// end for(scales)
  }