@Test(groups="1s", timeOut=60000) public void testIseq(){ Random rnd = new Random(); for(int i = 0 ; i < 1_000_000; i++){ rnd.setSeed(i); int value = rnd.nextInt() * (1-rnd.nextInt(2)); boolean eq = rnd.nextBoolean(); long lvalue = eq ? value : leq(value); Assert.assertEquals(iseq(lvalue), eq); Assert.assertEquals(ivalue(lvalue), value); } }
static boolean iseq(long v) { return v < FRONTIER; }
PropNogoods extends Propagator<Variable> { static boolean iseq(long v) { return v < FRONTIER; } }
PropNogoods extends Propagator<Variable> { static boolean iseq(long v) { return v < FRONTIER; } PropNogoods(Model model); }
PropNogoods extends Propagator<Variable> { static boolean iseq(long v) { return v < FRONTIER; } PropNogoods(Model model); @Override void propagate(int evtmask); @Override void propagate(int idxVarInProp, int mask); @Override ESat isEntailed(); void initialize(); int Literal(IntVar ivar, int value, boolean eq); int Literal(SetVar svar, int value, boolean in); @SuppressWarnings("unused") boolean addNogood(int p); @SuppressWarnings("unused") boolean addNogood(TIntList lits); void addLearnt(int... lits); }
PropNogoods extends Propagator<Variable> { static boolean iseq(long v) { return v < FRONTIER; } PropNogoods(Model model); @Override void propagate(int evtmask); @Override void propagate(int idxVarInProp, int mask); @Override ESat isEntailed(); void initialize(); int Literal(IntVar ivar, int value, boolean eq); int Literal(SetVar svar, int value, boolean in); @SuppressWarnings("unused") boolean addNogood(int p); @SuppressWarnings("unused") boolean addNogood(TIntList lits); void addLearnt(int... lits);  }