Package gnu.trove.map.hash

Examples of gnu.trove.map.hash.TIntFloatHashMap.containsKey()


            cursor = 0;
            while (cursor < pairs.length) {
                int pos = pairs[cursor++];
                float val = (float) pairs[cursor++];
                if (results.containsKey(pos)) {
                    val = results.get(pos) + val;
                    results.put(pos, val);
                    if (val > max) {
                        max = val;
                    }
View Full Code Here


        TIntFloatHashMap data = center.data;
        TIntFloatIterator it = sv.data.iterator();
        while (it.hasNext()) {
            it.advance();
            int key = it.key();
            if (!data.containsKey(key)) {
                dist += it.value() * it.value();
            }
            else {
                float temp = data.get(key) / count;
                dist -= temp * temp;
 
View Full Code Here

        float base = baseDistList.get(classid);
        TIntFloatHashMap center = classCenter.get(classid).data;
        TIntFloatIterator it =  vector.data.iterator();
        while (it.hasNext()) {
            it.advance();
            if (!center.containsKey(it.key())) {
                base += it.value() * it.value();
            }
            else {
                float temp = center.get(it.key());
                base -= temp * temp;
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.