Package com.enigmastation.collections

Examples of com.enigmastation.collections.Tuple


    public List<Tuple> getTopMatches(NestedDictionaryStringStringDouble dict, Object person, int matches) {
        List<Tuple> scores = new FastList<Tuple>();
        for (Object other : dict.keySet()) {
            if (!other.equals(person)) {
                Tuple t = new Tuple(other, this.getDistance(dict, other, person));
                //System.out.println(t);
                scores.add(t);
            }
        }
        Collections.sort(scores, new Comparator<Tuple>() {
View Full Code Here


            }
        }
        List<Tuple> rankings = new FastList<Tuple>();
        for (Object item : totals.keySet()) {
            double d = totals.get(item) / simSums.get(item);
            rankings.add(new Tuple(item, d));
        }
        Collections.sort(rankings, new Comparator<Tuple>() {
            public int compare(Tuple o1, Tuple o2) {
                if (o1.getValue() > o2.getValue()) {
                    return -1;
View Full Code Here

TOP

Related Classes of com.enigmastation.collections.Tuple

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.