// Test Heapselect
System.out.println("Testing Heapselect");
Heapselect heap = new Heapselect(M);
Ran myran = new Ran(17);
// Find top 100 values in 1000 random numbers
for (i=0;i<N;i++) heap.add(myran.doub());
for (i=0;i<M;i++) x[i]=heap.report(M-1-i);
xm=x[0]; // The Mth largest
Ran myran2 = new Ran(17); // Repeat same sequence
j=0;
for (i=0;i<N;i++) {