// test_combinations.java extra stuff in vecis is not combinationsd class test_combinations { test_combinations() { int veci[] = {1,2,3,4,5}; // indices, in and out of combination double vecd[] = {1.0, 2.0, 3.0, 4.0}; int vecdi[] = {0,1,2,3}; // indices, in and out of combination char vecc[] = {'a', 'b', 'c', 'd', 'e'}; String vecs = "abcd"; int vcomb[] = new int[6]; // only use 'm' double vdcomb[] = new double[4]; // vecd combinations boolean if_last = false; int n, m; combinations C; // instantiate class System.out.println("test_combinations.java running \n"); n = 3; m = 2; System.out.println("Combinations, "+n+" integers taken "+m+" at a time"); System.out.println("given "+veci[0]+" "+veci[1]+" "+veci[2]); C = new combinations(n,m); if_last = false; while(!if_last) { if_last=C.comb(veci, vcomb); System.out.println(vcomb[0]+" "+vcomb[1]); } System.out.println(" "); n = 4; m = 3; System.out.println("Combinations, "+n+" doubles taken "+m+" at a time"); System.out.println("given "+vecd[0]+" "+vecd[1]+" "+vecd[2]+" "+vecd[3]); C = new combinations(n,m); // reset veci of indices for(int i=0; i