Package bak.pcj

Examples of bak.pcj.IntCollection


    // ---------------------------------------------------------------
    //      Overriden methods
    // ---------------------------------------------------------------

    public String benchmarkContainsExisting(DataSet dataSet) {
        IntCollection c = create(dataSet.get(0));
        int[] l = dataSet.get(0);
        startTimer();
        for (int i = 0; i < SMALL_SIZE; i++)
            c.contains(l[i % l.length]);
        stopTimer();
        return SMALL_SIZE + " successful calls to contains() with " + c.size() + " elements";
    }
View Full Code Here


        stopTimer();
        return SMALL_SIZE + " successful calls to contains() with " + c.size() + " elements";
    }

    public String benchmarkContainsNonExisting(DataSet dataSet) {
        IntCollection c = create(dataSet.get(0));
        int[] l = dataSet.get(1);
        startTimer();
        for (int i = 0; i < SMALL_SIZE; i++)
            c.contains(l[i % l.length]);
        stopTimer();
        return SMALL_SIZE + " unsuccessful calls to contains() with " + c.size() + " elements";
    }
View Full Code Here

        stopTimer();
        return SMALL_SIZE + " unsuccessful calls to contains() with " + c.size() + " elements";
    }

    public String benchmarkRemoveExisting(DataSet dataSet) {
        IntCollection c = create(dataSet.get(0));
        int[] l = dataSet.get(0);
        startTimer();
        for (int i = 0; i < SMALL_SIZE; i++)
            c.remove(l[i % l.length]);
        stopTimer();
        return SMALL_SIZE + " successful calls to remove() with " + l.length + " existing elements";
    }
View Full Code Here

        stopTimer();
        return SMALL_SIZE + " successful calls to remove() with " + l.length + " existing elements";
    }

    public String benchmarkRemoveNonExisting(DataSet dataSet) {
        IntCollection c = create(dataSet.get(0));
        int[] l = dataSet.get(1);
        startTimer();
        for (int i = 0; i < SMALL_SIZE; i++)
            c.remove(l[i % l.length]);
        stopTimer();
        return SMALL_SIZE + " unsuccessful calls to remove() with " + l.length + " existing elements";
    }
View Full Code Here

        String name = v.getClass().getName();
        return name;
    }

    public String benchmarkAddExisting(DataSet dataSet) {
        IntCollection c = create(dataSet.get(0));
        int[] l = dataSet.get(0);
        startTimer();
        for (int i = 0; i < l.length; i++)
            c.add(l[i]);
        stopTimer();
        return l.length + " overwriting calls to add() with " + l.length + " elements";
    }
View Full Code Here

        stopTimer();
        return l.length + " overwriting calls to add() with " + l.length + " elements";
    }

    public String benchmarkAddNonExisting(DataSet dataSet) {
        IntCollection c = create(dataSet.get(0));
        int[] l = dataSet.get(1);
        startTimer();
        for (int i = 0; i < l.length; i++)
            c.add(l[i]);
        stopTimer();
        return l.length + " non-overwriting calls to add() with " + l.length + " elements";
    }
View Full Code Here

        stopTimer();
        return l.length + " non-overwriting calls to add() with " + l.length + " elements";
    }

    public String benchmarkContainsExisting(DataSet dataSet) {
        IntCollection c = create(dataSet.get(0));
        int[] l = dataSet.get(0);
        startTimer();
        for (int i = 0; i < l.length; i++)
            c.contains(l[i]);
        stopTimer();
        return l.length + " successful calls to contains() with " + c.size() + " elements";
    }
View Full Code Here

        stopTimer();
        return l.length + " successful calls to contains() with " + c.size() + " elements";
    }

    public String benchmarkContainsNonExisting(DataSet dataSet) {
        IntCollection c = create(dataSet.get(0));
        int[] l = dataSet.get(1);
        startTimer();
        for (int i = 0; i < l.length; i++)
            c.contains(l[i]);
        stopTimer();
        return l.length + " unsuccessful calls to contains() with " + c.size() + " elements";
    }
View Full Code Here

        stopTimer();
        return l.length + " unsuccessful calls to contains() with " + c.size() + " elements";
    }

    public String benchmarkRemoveExisting(DataSet dataSet) {
        IntCollection c = create(dataSet.get(0));
        int[] l = dataSet.get(0);
        startTimer();
        for (int i = 0; i < l.length; i++)
            c.remove(l[i]);
        stopTimer();
        return l.length + " successful calls to remove() with " + l.length + " elements";
    }
View Full Code Here

        stopTimer();
        return l.length + " successful calls to remove() with " + l.length + " elements";
    }

    public String benchmarkRemoveNonExisting(DataSet dataSet) {
        IntCollection c = create(dataSet.get(0));
        int[] l = dataSet.get(1);
        startTimer();
        for (int i = 0; i < l.length; i++)
            c.remove(l[i]);
        stopTimer();
        return l.length + " unsuccessful calls to remove() with " + l.length + " elements";
    }
View Full Code Here

TOP

Related Classes of bak.pcj.IntCollection

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.