@Test(groups = "1s") public void testValueVar() throws Exception { Assert.assertEquals(sat.valueVar(c), SatSolver.Boolean.kUndefined); sat.propagateOneLiteral(SatSolver.makeLiteral(c, true)); Assert.assertEquals(sat.valueVar(c), SatSolver.Boolean.kFalse); Assert.assertEquals(sat.valueVar(d), SatSolver.Boolean.kUndefined); sat.propagateOneLiteral(SatSolver.makeLiteral(d, false)); Assert.assertEquals(sat.valueVar(d), SatSolver.Boolean.kTrue); }
Boolean valueVar(int x) { return assignment_.get(x); }
SatSolver implements SatFactory { Boolean valueVar(int x) { return assignment_.get(x); } }
SatSolver implements SatFactory { Boolean valueVar(int x) { return assignment_.get(x); } SatSolver(); }
SatSolver implements SatFactory { Boolean valueVar(int x) { return assignment_.get(x); } SatSolver(); @Override SatSolver _me(); int newVariable(); boolean addClause(TIntList ps); boolean learnClause(int... ps); boolean addClause(int l); void cancelUntil(int level); int trailMarker(); int nLearnt(); boolean propagateOneLiteral(int lit); void detachLearnt(int ci); static int makeLiteral(int var, boolean sign); static int negated(int l); static boolean sign(int l); static int var(int l); void copyFrom(SatSolver o); long nbclauses(); long numvars(); }
SatSolver implements SatFactory { Boolean valueVar(int x) { return assignment_.get(x); } SatSolver(); @Override SatSolver _me(); int newVariable(); boolean addClause(TIntList ps); boolean learnClause(int... ps); boolean addClause(int l); void cancelUntil(int level); int trailMarker(); int nLearnt(); boolean propagateOneLiteral(int lit); void detachLearnt(int ci); static int makeLiteral(int var, boolean sign); static int negated(int l); static boolean sign(int l); static int var(int l); void copyFrom(SatSolver o); long nbclauses(); long numvars(); public boolean ok_; public ArrayList<Clause> clauses; public ArrayList<Clause> learnts; public TIntObjectHashMap<TIntArrayList> implies_; public TIntArrayList touched_variables_; }