Sort the double array in ascending order using this algorithm.

@param doubleArray the array of double that we want to sort
344076
public static void sort(double[] doubleArray) {
        int index = 0;
        double value = 0.0;
        
        for(int i = 1; i < doubleArray.length; i++) {
            index = i;
            value = doubleArray[index];
            
            while(index > 0 && value < doubleArray[index - 1]) {
                doubleArray[index] = doubleArray[index - 1];
                
                index--;
            }
            
            doubleArray[index] = value;
        }
    }
103277
public static void sortDescending(byte[] byteArray) {
        int index = 0;
        byte value = 0;
        
        for(int i = 1; i < byteArray.length; i++) {
            index = i;
            value = byteArray[index];
            
            while(index > 0 && value > byteArray[index - 1]) {
                byteArray[index] = byteArray[index - 1];
                
                index--;
            }
            
            byteArray[index] = value;
        }
    }
1246292
static void bucketSort(final Object[] a) {
        if (N.isNullOrEmpty(a)) {
            return;
        }

        bucketSort(a, 0, a.length);
    }
377583
public @Nonnull Iterable<Double> doubles() {
        final JsonArray parent=this;
        return () -> {
            final Iterator<JsonElement> iterator = parent.iterator();
            return new Iterator<Double>() {

                @Override
                public boolean hasNext() {
                    return iterator.hasNext();
                }

                @Override
                public Double next() {
                    return iterator.next().asDouble();
                }

                @Override
                public void remove() {
                    iterator.remove();
                }
            };
        };
    }
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;
        }
    }
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;
                }
            }            
        }
    }
1126548
public static double[] copyOf(double[] doubleArray) {

    	double[] copy = new double[doubleArray.length];
        System.arraycopy(doubleArray, 0, copy, 0, doubleArray.length);
        return copy;
    }
1334440
private double[][] concatenateArrays(double[][] first, double[][] second){
        // I am sure as hell that should be a better way to do this...
        double[][] result = new double[first.length][first[0].length + second[0].length];
        for(int i = 0; i < first.length; i++){
            for (int j = 0; j < (first[i].length + second[i].length); j++){
                if( j < first[i].length){
                    result[i][j] = first[i][j];
                } else{
                    result[i][j] = second[i][j - first[i].length];
                }
            }
        }
        return result;
    }
1026619
public void readArray(double[] data) throws IOException {
        int size = data.length;
        for (int i = 0; i < size; ++i)
            data[i] = getDouble();
    }
594512
public static <T extends Comparable<? super T>> void sort (T[] a)
    {
        sort(a, 0, a.length - 1);
    }
924891
public static void sortDescending(float[] floatArray) {
        int index = 0;
        float value = 0;
        
        for(int i = 1; i < floatArray.length; i++) {
            index = i;
            value = floatArray[index];
            
            while(index > 0 && value > floatArray[index - 1]) {
                floatArray[index] = floatArray[index - 1];
                
                index--;
            }
            
            floatArray[index] = value;
        }
    }
757926
public static <E extends Comparable<E>> void sortDescending(E[] array) {
        while(!Sort.isReverseSorted(array)) {
            FYShuffle.shuffle(array);
        }
    }
437997
public int getMaxValueIndex(double[] array) {

        int index = 0;
        double max = Integer.MIN_VALUE;

        for (int i = 0; i < array.length; i++) {
            if (array[i] > max) {
                max = array[i];
                index = i;
            }
        }

        return index;
    }
442531
public static void reorder(int[] array, int[] order) {
        int[] original = copyOf(array);
        for (int i = 0; i < array.length; i++) {
            array[i] = original[order[i]];
        }
    }
391083
public static void sortDescending(int[] intArray) {
        boolean swapped = true;
        
        while(swapped) {
            swapped = false;
            
            for(int i = 0; i < (intArray.length - 1 ); i++) {
                if(intArray[i] < intArray[i + 1]) {
                    TrivialSwap.swap(intArray, i, i + 1);
                    
                    swapped = true;
                }
            }            
        }
    }
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();
    }
832735
public void sort(@NonNull Comparator<? super T> comparator) {
        final ArrayList<T> copy = new ArrayList<>(mObjects);
        Collections.sort(copy, comparator);
        swap(copy);
    }