import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class SortTest {
public static void main(String[] args)throws Exception {
String[] strs2=new String[]{"希尔排序","直接插入排序","折半插入排序","冒泡排序"};
new SortTest().test(strs2,100000,1900000,100000);
}
private void testErr(String[] strings) throws Exception{
//System.out.println(Arrays.toString(old));
System.out.println(Arrays.toString(strings));
Number[] old=getRundom(50);
Integer[] oo={1,2,3,3,2,21,5,6,7,78,5,65,8,7,6,6,6,6,6,9,56544,354,32,4,456,8,89,-9,0,3,243,-321,321,-3,-2,21};
old=oo;
for(String s:strings){
Number[] testNum=Arrays.copyOf(old, old.length);
long begin=System.currentTimeMillis();
SortTest.class.getMethod(s, Number[].class).invoke(this, (Object)testNum);
long end=System.currentTimeMillis();
System.out.println(s+":"+(end-begin)+"\t");
System.out.println(Arrays.toString(testNum));
}
System.out.println();
}