void sort_duan(double[][] x, double[] y) {
        Vector<Integer> indices = new Vector<Integer>();
        for (int i = 0; i < x.length; i++) {
            indices.add(new Integer(i));
        }
        if (!stepData.maximizeObjectiveFunctionValue()) {
            Sorter sorter = new Sorter(y, Sorter.ASCENDING);
            Collections.sort(indices, sorter);
            Arrays.sort(y);
        } else {
            Sorter sorter = new Sorter(y, Sorter.DESCENDING);
            Collections.sort(indices, sorter);
            // sort y[] in ascending order
            Arrays.sort(y);
            // reverse the order of y to be in descending order
            double[] new_y = new double[y.length];
            for (int i = 0; i < y.length; i++) {
                new_y[i] = y[y.length - 1 - i];
            }
            for (int i = 0; i < y.length; i++) {
                y[i] = new_y[i];
            }
        }
        double[][] new_x = new double[x.length][x[0].length];
        for (int i = 0; i < new_x.length; i++) {
            new_x[i] = x[indices.get(i).intValue()];
        }
        for (int i = 0; i < x.length; i++) {
            x[i] = new_x[i];
        }
    }