Package org.apache.mahout.math.map

Examples of org.apache.mahout.math.map.OpenIntIntHashMap


public class MahoutMap extends MapImplementation<OpenIntIntHashMap>
{
    public MahoutMap()
    {
        super(new OpenIntIntHashMap(
            IntIntOpenHashMap.DEFAULT_CAPACITY,
            AbstractIntIntMap.DEFAULT_MIN_LOAD_FACTOR,
            IntIntOpenHashMap.DEFAULT_LOAD_FACTOR));
    }
View Full Code Here


    public int get(int k) { return instance.get(k); }

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

    }

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

  }

  private void initCaches() {
    this.caches = new OpenIntIntHashMap[getProbes()];
    for (int probe = 0; probe < getProbes(); probe++) {
      caches[probe] = new OpenIntIntHashMap();
    }
  }
View Full Code Here

  }

  private void initCaches() {
    caches = new OpenIntIntHashMap[getProbes()];
    for (int probe = 0; probe < getProbes(); probe++) {
      caches[probe] = new OpenIntIntHashMap();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.mahout.math.map.OpenIntIntHashMap

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.