|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sat4j.minisat.constraints.cnf.UnitClause
public class UnitClause
Field Summary | |
---|---|
protected int |
literal
|
Constructor Summary | |
---|---|
UnitClause(int value)
|
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 |
canBePropagatedMultipleTimes()
Partition constraints into the ones that can only be found once on the trail (e.g. clauses) and the ones that can be found several times (e.g. |
void |
forwardActivity(double claInc)
|
int |
get(int i)
returns the ith literal in the constraint |
double |
getActivity()
To obtain the activity of the constraint. |
void |
incActivity(double claInc)
Increase the constraint activity. |
boolean |
learnt()
|
boolean |
locked()
Indicate wether a constraint is responsible from an assignment. |
boolean |
propagate(UnitPropagationListener s,
int p)
|
void |
register()
Register the constraint to the solver. |
void |
remove(UnitPropagationListener upl)
Remove a constraint from the solver. |
void |
rescaleBy(double d)
Rescale the clause activity by a value. |
void |
setActivity(double claInc)
Set the activity at a specific value |
void |
setLearnt()
Mark a constraint as learnt. |
boolean |
simplify()
Simplifies a constraint, by removing top level falsified literals for instance. |
int |
size()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final int literal
Constructor Detail |
---|
public UnitClause(int value)
Method Detail |
---|
public void assertConstraint(UnitPropagationListener s)
Constr
assertConstraint
in interface Constr
s
- a UnitPropagationListener to use for unit propagation.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 double getActivity()
IConstr
getActivity
in interface IConstr
public void incActivity(double claInc)
Constr
incActivity
in interface Constr
claInc
- the value to increase the activity withpublic void setActivity(double claInc)
Constr
setActivity
in interface Constr
claInc
- the new activitypublic boolean locked()
Constr
locked
in interface Constr
public void register()
Constr
register
in interface Constr
public void remove(UnitPropagationListener upl)
Constr
remove
in interface Constr
public void rescaleBy(double d)
Constr
rescaleBy
in interface Constr
d
- the value to rescale the clause activity with.public void setLearnt()
Constr
setLearnt
in interface Constr
public boolean simplify()
Constr
simplify
in interface Constr
public boolean propagate(UnitPropagationListener s, int p)
public int get(int i)
IConstr
get
in interface IConstr
i
- the index of the literal
public boolean learnt()
learnt
in interface IConstr
public int size()
size
in interface IConstr
public void forwardActivity(double claInc)
forwardActivity
in interface Constr
public String toString()
toString
in class Object
public boolean canBePropagatedMultipleTimes()
IConstr
canBePropagatedMultipleTimes
in interface IConstr
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |