Here you can find the source of sort(Double[] inArray)
Parameter | Description |
---|---|
inArray | a parameter |
public static void sort(Double[] inArray)
//package com.java2s; //License from project: Open Source License public class Main { /**// www . j a v a 2 s . c o m *A simple Insertion sort performed on an array of doubles * @param inArray */ public static void sort(Double[] inArray) { int idx = 0; int j; double x; for (int i = 1; i < inArray.length; i++) { j = i; x = inArray[i]; while ((j > 0) && (inArray[j - 1] > x)) { inArray[j] = inArray[j - 1]; j--; } inArray[j] = x; } } }