* @param column Index of column to be used as the sorting key.
* @return Matrix whose rows have been shuffled around.
*/
public static double[][] sort(double[][] values, int column) {
double[][] sorted_values = new double[values.length][values[0].length];
Sorting s = new Sorting(getColumnCopy(values, column), false);
for (int i = 0; i < sorted_values.length; i++)
System.arraycopy(values[s.getIndex(i)], 0, sorted_values[i], 0, values[s.getIndex(i)].length);
return sorted_values;
}