Package com.carrotsearch.hppc

Examples of com.carrotsearch.hppc.IntIntOpenHashMap.containsKey()


    public int containKeys(int [] keys)
    {
        final IntIntOpenHashMap prepared = this.instance;
        int count = 0;
        for (int i = 0; i < keys.length; i++)
            count += prepared.containsKey(keys[i]) ? 1 : 0;
        return count;
    }
   
    @Override
    public int putAll(int [] keys, int [] values)
View Full Code Here


            }

            for (int wordIndex = 0; wordIndex < wordIndices.length; wordIndex++)
            {
                final int stemIndex = wordsStemIndex[wordIndices[wordIndex]];
                if (stemToRowIndex.containsKey(stemIndex))
                {
                    final int rowIndex = stemToRowIndex.lget();

                    double weight = termWeighting.calculateTermWeight(stemsTf[stemIndex],
                        stemsTfByDocument[stemIndex].length / 2, documentCount);
View Full Code Here

            IntIntOpenHashMap tracker = new IntIntOpenHashMap();
            for (int i = 0; i < COUNT; i++) {
                Map<String, Object> fieldValues = new HashMap<>();
                for (int fieldSuffix = 1; fieldSuffix <= FIELD_LIMIT; fieldSuffix <<= 1) {
                    int index;
                    if (tracker.containsKey(fieldSuffix)) {
                        index = tracker.lget();
                    } else {
                        tracker.put(fieldSuffix, index = 0);
                    }
                    if (index >= fieldSuffix) {
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.