|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sat4j.minisat.constraints.cnf.BinaryClause
public abstract class BinaryClause
Data structure for binary clause.
Constructor Summary | |
---|---|
BinaryClause(IVecInt ps,
ILits voc)
Creates a new basic clause |
Method Summary | |
---|---|
void |
assertConstraint(UnitPropagationListener s)
Method called when the constraint is to be asserted. |
void |
calcReason(int p,
IVecInt outReason)
Compute the reason for a given assignment. |
boolean |
equals(java.lang.Object obj)
|
int |
get(int i)
Retourne le ieme literal de la clause. |
double |
getActivity()
To obtain the activity of the constraint. |
int[] |
getLits()
|
ILits |
getVocabulary()
|
int |
hashCode()
|
void |
incActivity(double claInc)
Increase the constraint activity. |
boolean |
locked()
Indicate wether a constraint is responsible from an assignment. |
boolean |
propagate(UnitPropagationListener s,
int p)
Propagate the truth value of a literal in constraints in which that literal is falsified. |
void |
register()
Register the constraint to the solver. |
void |
remove()
Remove a constraint from the solver. |
void |
rescaleBy(double d)
Rescale the clause activity by a value. |
boolean |
simplify()
Simplifies a constraint, by removing top level falsified literals for instance. |
int |
size()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.sat4j.minisat.core.Constr |
---|
setLearnt |
Methods inherited from interface org.sat4j.specs.IConstr |
---|
learnt |
Constructor Detail |
---|
public BinaryClause(IVecInt ps, ILits voc)
voc
- the vocabulary of the formulaps
- A VecInt that WILL BE EMPTY after calling that method.Method Detail |
---|
public void calcReason(int p, IVecInt outReason)
Constr
calcReason
in interface Constr
p
- a satisfied literal (or Lit.UNDEFINED)outReason
- the list of falsified literals whose negation is the reason of
the assignment of p to true.public void remove()
Constr
remove
in interface Constr
public boolean simplify()
Constr
simplify
in interface Constr
public boolean propagate(UnitPropagationListener s, int p)
Propagatable
propagate
in interface Propagatable
s
- something able to perform unit propagationp
- the literal being propagated. Its negation must appear in the
constraint.
public boolean locked()
Constr
locked
in interface Constr
public double getActivity()
Constr
getActivity
in interface Constr
public java.lang.String toString()
toString
in class java.lang.Object
public int get(int i)
get
in interface IConstr
i
- the index of the literal
public void incActivity(double claInc)
Constr
incActivity
in interface Constr
claInc
- public void rescaleBy(double d)
Constr
rescaleBy
in interface Constr
d
- public int size()
size
in interface IConstr
public void assertConstraint(UnitPropagationListener s)
Constr
assertConstraint
in interface Constr
s
- a UnitPropagationListener to use for unit propagation.public ILits getVocabulary()
public int[] getLits()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void register()
Constr
register
in interface Constr
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |