Sort the double array in ascending order using this algorithm.

@param doubleArray the array of double that we want to sort
499758
public static void sort(double[] doubleArray) {
        boolean swapped = true;
        
        while(swapped) {
            swapped = false;
            
            for(int i = 0; i < (doubleArray.length - 1 ); i++) {
                if(doubleArray[i] > doubleArray[i + 1]) {
                    TrivialSwap.swap(doubleArray, i, i + 1);
                    
                    swapped = true;
                }
            }            
        }
    }
165
@SuppressWarnings("unchecked")
	public <T> void sort(Arr arr, Comparator<T> c) {
		int l = arr.getLength();
		Object[] objs = new Object[l];
		for (int i=0; i<l; i++) {
			objs[i] = arr.get(i);
		}
		Arrays.sort((T[])objs, c);
		for (int i=0; i<l; i++) {
			arr.put(i, objs[i]);
		}
	}
1130712
public static void sortDescending(short[] shortArray) {
        int index = 0;
        short value = 0;
        
        for(int i = 1; i < shortArray.length; i++) {
            index = i;
            value = shortArray[index];
            
            while(index > 0 && value > shortArray[index - 1]) {
                shortArray[index] = shortArray[index - 1];
                
                index--;
            }
            
            shortArray[index] = value;
        }
    }
50140
public static void sort(short[] shortArray) {
        boolean swapped = true;
        
        while(swapped) {
            swapped = false;
            
            for(int i = 0; i < (shortArray.length - 1 ); i++) {
                if(shortArray[i] > shortArray[i + 1]) {
                    TrivialSwap.swap(shortArray, i, i + 1);
                    
                    swapped = true;
                }
            }            
        }
    }
1073464
public static void sortArray(int[] array) {

        boolean swapped;

        do {
            swapped = false;

            for (int i = 0; i < array.length - 1; i++) {
                if (array[i] > array[i + 1]) {
                    int temp = array[i + 1];

                    array[i + 1] = array[i];
                    array[i]     = temp;
                    swapped      = true;
                }
            }
        } while (swapped);
    }
1287529
public static function sortArrayByArray(array $array, array $orderArray)
    {
        $ordered = array();
        foreach ($orderArray as $key) {
            if (array_key_exists($key, $array)) {
                $ordered[$key] = $array[$key];
                unset($array[$key]);
            }
        }
        return $ordered + $array;
    }
1375032
public static int[] Argsort(final float[] array, final boolean ascending) {
        Integer[] indexes = new Integer[array.length];
        for (int i = 0; i < indexes.length; i++) {
            indexes[i] = i;
        }
        Arrays.sort(indexes, new Comparator<Integer>() {
            @Override
            public int compare(final Integer i1, final Integer i2) {
                return (ascending ? 1 : -1) * Float.compare(array[i1], array[i2]);
            }
        });
        return asArray(indexes);
    }
1246329
protected void set(double values[])
    {
        this.nRows  = values.length;
        this.nCols  = 1;
        this.values = new double[nRows][1];

        for (int r = 0; r < nRows; ++r) {
            this.values[r][0] = values[r];
        }
    }
1240427
public void sort( double[] values, Object[] valuesToFollow ) {
        this.valuesToSort = values;
        this.valuesToFollow = valuesToFollow;

        number = values.length;

        monitor.beginTask("Sorting...", -1);

        monitor.worked(1);
        quicksort(0, number - 1);

        monitor.done();
    }
1229928
public static void sort(long[] longArray) {
        boolean swapped = true;
        
        while(swapped) {
            swapped = false;
            
            for(int i = 0; i < (longArray.length - 1 ); i++) {
                if(longArray[i] > longArray[i + 1]) {
                    TrivialSwap.swap(longArray, i, i + 1);
                    
                    swapped = true;
                }
            }            
        }
    }
231774
public static void sort(double[] data, int rowLength)
    {
        quickSort(data, 0, (data.length - 1)/rowLength, rowLength, NATURAL_ROW_COMPARATOR, new double[rowLength], new double[rowLength]);
    }
595224
private static void sort (double[] coords1, int length1,
                              double[] coords2, int length2, int[] array) {
        int temp;
        int length = length1 + length2;
        double x1, y1, x2, y2;

        for (int i = 1; i < length; i++) {
            if (array[i - 1] < length1) {
                x1 = coords1[2 * array[i - 1]];
                y1 = coords1[2 * array[i - 1] + 1];
            } else {
                x1 = coords2[2 * (array[i - 1] - length1)];
                y1 = coords2[2 * (array[i - 1] - length1) + 1];
            }
            if (array[i] < length1) {
                x2 = coords1[2 * array[i]];
                y2 = coords1[2 * array[i] + 1];
            } else {
                x2 = coords2[2 * (array[i] - length1)];
                y2 = coords2[2 * (array[i] - length1) + 1];
            }
            int j = i;
            while (j > 0 && compare(x1, y1, x2, y2) <= 0) {
                temp = array[j];
                array[j] = array[j - 1];
                array[j - 1] = temp;
                j--;
                if (j > 0) {
                    if (array[j - 1] < length1) {
                        x1 = coords1[2 * array[j - 1]];
                        y1 = coords1[2 * array[j - 1] + 1];
                    } else {
                        x1 = coords2[2 * (array[j - 1] - length1)];
                        y1 = coords2[2 * (array[j - 1] - length1) + 1];
                    }
                    if (array[j] < length1) {
                        x2 = coords1[2 * array[j]];
                        y2 = coords1[2 * array[j] + 1];
                    } else {
                        x2 = coords2[2 * (array[j] - length1)];
                        y2 = coords2[2 * (array[j] - length1) + 1];
                    }
                }
            }
        }
    }
1026619
public void readArray(double[] data) throws IOException {
        int size = data.length;
        for (int i = 0; i < size; ++i)
            data[i] = getDouble();
    }
1126548
public static double[] copyOf(double[] doubleArray) {

    	double[] copy = new double[doubleArray.length];
        System.arraycopy(doubleArray, 0, copy, 0, doubleArray.length);
        return copy;
    }
37283
public void sort() {
        if (!sorted) {
            sort(heap, Math.min(k,n));
            sorted = true;
        }
    }
857610
public static void sort(char[] charArray) {
        boolean swapped = true;
        
        while(swapped) {
            swapped = false;
            
            for(int i = 0; i < (charArray.length - 1 ); i++) {
                if(charArray[i] > charArray[i + 1]) {
                    TrivialSwap.swap(charArray, i, i + 1);
                    
                    swapped = true;
                }
            }            
        }
    }
528670
public static void shuffle(double[] doubleArray) {
		int swapPlace = -1;

		for(int i = 0; i < doubleArray.length; i++) {
            swapPlace = (int) (Math.random() * (doubleArray.length - 1 ));
            TrivialSwap.swap(doubleArray, i, swapPlace);
		}
	}