Package com.nr.sort

Examples of com.nr.sort.Heapselect


   

    // 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++) {
View Full Code Here

TOP

Related Classes of com.nr.sort.Heapselect

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.