org.sat4j.minisat.constraints.pb
Class WLClausePB
java.lang.Object
org.sat4j.minisat.constraints.cnf.WLClause
org.sat4j.minisat.constraints.cnf.DefaultWLClause
org.sat4j.minisat.constraints.pb.WLClausePB
- All Implemented Interfaces:
- java.io.Serializable, PBConstr, Constr, Propagatable, IConstr
public class WLClausePB
- extends DefaultWLClause
- implements PBConstr
- See Also:
- Serialized Form
Fields inherited from class org.sat4j.minisat.constraints.cnf.WLClause |
lits, voc |
Methods inherited from class org.sat4j.minisat.constraints.cnf.WLClause |
calcReason, get, getActivity, getLits, getVocabulary, incActivity, locked, propagate, remove, rescaleBy, sanityCheck, simplify, size, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WLClausePB
public WLClausePB(IVecInt ps,
ILits voc)
getCoef
public java.math.BigInteger getCoef(int literal)
- Specified by:
getCoef
in interface PBConstr
getDegree
public java.math.BigInteger getDegree()
- Specified by:
getDegree
in interface PBConstr
getCoefs
public java.math.BigInteger[] getCoefs()
- Specified by:
getCoefs
in interface PBConstr
brandNewClause
public static WLClausePB brandNewClause(UnitPropagationListener s,
ILits voc,
IVecInt literals)
- Creates a brand new clause, presumably from external data. Performs all
sanity checks.
- Parameters:
s
- the object responsible for unit propagationvoc
- the vocabularyliterals
- the literals to store in the clause
- Returns:
- the created clause or null if the clause should be ignored
(tautology for example)
assertConstraint
public void assertConstraint(UnitPropagationListener s)
- Description copied from interface:
Constr
- Method called when the constraint is to be asserted. It means that the
constraint was learnt during the search and it should now propagate some
truth values. In the clausal case, only one literal should be propagated.
In other cases, it might be different.
- Specified by:
assertConstraint
in interface Constr
- Overrides:
assertConstraint
in class WLClause
- Parameters:
s
- a UnitPropagationListener to use for unit propagation.
computeAnImpliedClause
public IVecInt computeAnImpliedClause()
- Specified by:
computeAnImpliedClause
in interface PBConstr
Copyright © 2007 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.