Examples of TIntIntHashMap


Examples of gnu.trove.map.hash.TIntIntHashMap

        n = vars.length;
        matching = new int[n];
        for (int i = 0; i < n; i++) {
            matching[i] = -1;
        }
        map = new TIntIntHashMap();
        IntVar v;
        int ub;
        int idx = n;
        for (int i = 0; i < n; i++) {
            v = vars[i];
View Full Code Here

Examples of gnu.trove.map.hash.TIntIntHashMap

        super("GCC", createProp(vars, values, cards));
    }

  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

Examples of gnu.trove.map.hash.TIntIntHashMap

        this.idms = new IIntDeltaMonitor[this.vars.length];
        for (int i = 0; i < this.vars.length; i++) {
            idms[i] = this.vars[i].monitorDelta(this);
        }
        n = variables.length;
        map = new TIntIntHashMap();
        IntVar v;
        int ub;
        int idx = n;
        for (int i = 0; i < n; i++) {
            v = vars[i];
View Full Code Here

Examples of gnu.trove.map.hash.TIntIntHashMap

            IntVar[] Y = new IntVar[size];
            for (int i = 0; i < size; i++) {
                this.vars[i + n].duplicate(solver, identitymap);
                Y[i] = (IntVar) identitymap.get(this.vars[i + n]);
            }
            identitymap.put(this, new PropFastGCC(X, this.values.clone(), new TIntIntHashMap(this.map), Y));
        }
    }
View Full Code Here

Examples of gnu.trove.map.hash.TIntIntHashMap

        PDF, EPS, SVG
    }

    public MatrixOutput(Solver solver, String name, Output op) {
        this.solver = solver;
        v2idx = new TIntIntHashMap();
        p2idx = new TIntIntHashMap();
        type = op;
        this.name = name;
    }
View Full Code Here

Examples of gnu.trove.map.hash.TIntIntHashMap

    protected TIntIntHashMap p2w;


    public FailPerPropagator(Constraint[] constraints, Solver solver) {
        p2w = new TIntIntHashMap();
        init(constraints);
        solver.plugMonitor(this);
    }
View Full Code Here

Examples of gnu.trove.map.hash.TIntIntHashMap

public class MId2AbId implements IId2AbId {

    final TIntIntHashMap map;

    public MId2AbId(int size, int noValue) {
        this.map = new TIntIntHashMap(size, 0.5f, noValue, noValue);
    }
View Full Code Here

Examples of gnu.trove.map.hash.TIntIntHashMap

    protected TIntIntHashMap map;

    public Set_Swap_Hash(int n) {
        super(n);
        map = new TIntIntHashMap();
    }
View Full Code Here

Examples of gnu.trove.map.hash.TIntIntHashMap

        mA = new double[vars.length];
        sA = new double[vars.length];
        vAct = new IVal[vars.length];
        affected = new BitSet(vars.length);

        this.v2i = new TIntIntHashMap(vars.length);
        for (int i = 0; i < vars.length; i++) {
            v2i.put(vars[i].getId(), i);
            vars[i].addMonitor(this);
        }
View Full Code Here

Examples of gnu.trove.map.hash.TIntIntHashMap

        super(variables);
        this.variables = variables.clone();
        Solver solver = variables[0].getSolver();
        counter = new FailPerPropagator(solver.getCstrs(), solver);
        pid2ari = new TIntObjectHashMap<>();
        pid2arity = new TIntIntHashMap(10, 0.5F, -1, -1);
        bests = new TIntArrayList();
        this.valueSelector = valueSelector;
        decisionPool = new PoolManager<>();
        random = new java.util.Random(seed);
    }
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.