Package gnu.trove.map.hash

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


  private static Propagator createProp(IntVar[] vars, int[] values, IntVar[] cards) {
    assert values.length == cards.length;
    TIntIntHashMap map = new TIntIntHashMap();
    int idx = 0;
    for (int v : values) {
      if (!map.containsKey(v)) {
        map.put(v, idx);
        idx++;
      } else {
        throw new UnsupportedOperationException("ERROR: multiple occurrences of value: " + v);
      }
View Full Code Here


    public int containKeys(int [] keys)
    {
        final TIntIntHashMap 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

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.