Package gnu.trove.iterator

Examples of gnu.trove.iterator.TLongIntIterator


     * have been counted, {@code null} is returned.  Ties in counts are
     * arbitrarily broken.
     */
    public Pair<T> max() {
        int maxCount = 0;
        TLongIntIterator iter = counts.iterator();
        long maxIndex = 0;

        while (!iter.hasNext()) {
            iter.advance();

            int count = iter.value();
            if (count > maxCount) {
                maxIndex = iter.key();
                maxCount = count;
            }
        }
        if (maxCount == 0)
            return null;
View Full Code Here


     * have been counted, {@code null} is returned.  Ties in counts are
     * arbitrarily broken.
     */
    public Pair<T> min() {
        int minCount = Integer.MAX_VALUE;
        TLongIntIterator iter = counts.iterator();
        long minIndex = 0;

        while (!iter.hasNext()) {
            iter.advance();

            int count = iter.value();
            if (count < minCount) {
                minIndex = iter.key();
                minCount = count;
            }
        }
        if (minCount == Integer.MAX_VALUE)
            return null;
View Full Code Here

TOP

Related Classes of gnu.trove.iterator.TLongIntIterator

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.