Examples of adjustOrPutValue()


Examples of gnu.trove.map.hash.TIntIntHashMap.adjustOrPutValue()

        final TIntIntHashMap map = new TIntIntHashMap();
   
        for (int i = 0; i < CHARS.length - 1; i++)
        {
            final int bigram = CHARS[i] << 16 | CHARS[i+1];
            map.adjustOrPutValue(bigram, 1, 1);
        }
   
        guard = map.size();
    }
View Full Code Here

Examples of gnu.trove.map.hash.TObjectDoubleHashMap.adjustOrPutValue()

    }

    iter = m2.iterator();
    while (iter.hasNext()) {
      iter.advance();
      diffMap.adjustOrPutValue(iter.key(), -1 * m2Mult * iter.value(), -1
                               * m2Mult * iter.value());
    }

    double val = 0;
    iter = diffMap.iterator();
View Full Code Here

Examples of org.elasticsearch.common.trove.map.hash.TByteIntHashMap.adjustOrPutValue()

        for (Facet facet : facets) {
            InternalByteTermsFacet mFacet = (InternalByteTermsFacet) facet;
            missing += mFacet.missingCount();
            total += mFacet.totalCount();
            for (ByteEntry entry : mFacet.entries) {
                aggregated.adjustOrPutValue(entry.term, entry.count(), entry.count());
            }
        }

        BoundedTreeSet<ByteEntry> ordered = new BoundedTreeSet<ByteEntry>(first.comparatorType.comparator(), first.requiredSize);
        for (TByteIntIterator it = aggregated.iterator(); it.hasNext(); ) {
View Full Code Here

Examples of org.elasticsearch.common.trove.map.hash.TDoubleIntHashMap.adjustOrPutValue()

        for (Facet facet : facets) {
            InternalDoubleTermsFacet mFacet = (InternalDoubleTermsFacet) facet;
            missing += mFacet.missingCount();
            total += mFacet.totalCount();
            for (DoubleEntry entry : mFacet.entries) {
                aggregated.adjustOrPutValue(entry.term, entry.count(), entry.count());
            }
        }

        BoundedTreeSet<DoubleEntry> ordered = new BoundedTreeSet<DoubleEntry>(first.comparatorType.comparator(), first.requiredSize);
        for (TDoubleIntIterator it = aggregated.iterator(); it.hasNext(); ) {
View Full Code Here

Examples of org.elasticsearch.common.trove.map.hash.TFloatIntHashMap.adjustOrPutValue()

        for (Facet facet : facets) {
            InternalFloatTermsFacet mFacet = (InternalFloatTermsFacet) facet;
            missing += mFacet.missingCount();
            total += mFacet.totalCount();
            for (FloatEntry entry : mFacet.entries) {
                aggregated.adjustOrPutValue(entry.term, entry.count(), entry.count());
            }
        }

        BoundedTreeSet<FloatEntry> ordered = new BoundedTreeSet<FloatEntry>(first.comparatorType.comparator(), first.requiredSize);
        for (TFloatIntIterator it = aggregated.iterator(); it.hasNext(); ) {
View Full Code Here

Examples of org.elasticsearch.common.trove.map.hash.TIntIntHashMap.adjustOrPutValue()

            } else {
                intMap = new TIntIntHashMap();
            }
            for (long i = 0; i < PUT_OPERATIONS; i++) {
                int key = iValues[(int) (i % NUMBER_OF_KEYS)];
                intMap.adjustOrPutValue(key, 1, 1);
            }
        }
        stopWatch.stop();
        System.out.println("TIntIntHashMap: " + stopWatch.totalTime() + ", " + stopWatch.totalTime().millisFrac() / ITERATIONS + "ms");
View Full Code Here

Examples of org.elasticsearch.common.trove.map.hash.TIntIntHashMap.adjustOrPutValue()

        for (Facet facet : facets) {
            InternalIntTermsFacet mFacet = (InternalIntTermsFacet) facet;
            missing += mFacet.missingCount();
            total += mFacet.totalCount();
            for (IntEntry entry : mFacet.entries) {
                aggregated.adjustOrPutValue(entry.term, entry.count(), entry.count());
            }
        }

        BoundedTreeSet<IntEntry> ordered = new BoundedTreeSet<IntEntry>(first.comparatorType.comparator(), first.requiredSize);
        for (TIntIntIterator it = aggregated.iterator(); it.hasNext(); ) {
View Full Code Here

Examples of org.elasticsearch.common.trove.map.hash.TLongIntHashMap.adjustOrPutValue()

        for (Facet facet : facets) {
            InternalIpTermsFacet mFacet = (InternalIpTermsFacet) facet;
            missing += mFacet.missingCount();
            total += mFacet.totalCount();
            for (LongEntry entry : mFacet.entries) {
                aggregated.adjustOrPutValue(entry.term, entry.count(), entry.count());
            }
        }

        BoundedTreeSet<LongEntry> ordered = new BoundedTreeSet<LongEntry>(first.comparatorType.comparator(), first.requiredSize);
        for (TLongIntIterator it = aggregated.iterator(); it.hasNext(); ) {
View Full Code Here

Examples of org.elasticsearch.common.trove.map.hash.TLongIntHashMap.adjustOrPutValue()

        for (Facet facet : facets) {
            InternalLongTermsFacet mFacet = (InternalLongTermsFacet) facet;
            missing += mFacet.missingCount();
            total += mFacet.totalCount();
            for (LongEntry entry : mFacet.entries) {
                aggregated.adjustOrPutValue(entry.term, entry.count(), entry.count());
            }
        }

        BoundedTreeSet<LongEntry> ordered = new BoundedTreeSet<LongEntry>(first.comparatorType.comparator(), first.requiredSize);
        for (TLongIntIterator it = aggregated.iterator(); it.hasNext(); ) {
View Full Code Here

Examples of org.elasticsearch.common.trove.map.hash.TLongLongHashMap.adjustOrPutValue()

        for (Facet facet : facets) {
            InternalCountDateHistogramFacet histoFacet = (InternalCountDateHistogramFacet) facet;
            for (TLongLongIterator it = histoFacet.counts.iterator(); it.hasNext();) {
                it.advance();
                counts.adjustOrPutValue(it.key(), it.value(), it.value());
            }
            histoFacet.releaseCache();

        }
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.