code: static boolean mergeVertices(Point pt_1, Point pt_2, double w_1,
  			int rank_1, double w_2, int rank_2, Point pt_res, double[] w_res,
  			int[] rank_res) {
  		assert (!pt_1.isEmpty() && !pt_2.isEmpty());
  		boolean res = pt_1.equals(pt_2);
  
  		if (rank_1 > rank_2) {
  			pt_res = pt_1;
  			if (w_res != null) {
  				rank_res[0] = rank_1;
  				w_res[0] = w_1;
  			}
  			return res;
  		} else if (rank_2 > rank_1) {
  			pt_res = pt_2;
  			if (w_res != null) {
  				rank_res[0] = rank_1;
  				w_res[0] = w_1;
  			}
  			return res;
  		}
  
  		pt_res = pt_1;
  		Point2D pt2d = new Point2D();
  		mergeVertices2D(pt_1.getXY(), pt_2.getXY(), w_1, rank_1, w_2, rank_2,
  				pt2d, w_res, rank_res);
  		pt_res.setXY(pt2d);
  		return res;
  	}
docs: return true if the coordinates has changed.