public abstract class AbstractDataStructureFactory extends Object implements DataStructureFactory, Serializable
Modifier and Type | Field and Description |
---|---|
protected Learner |
learner |
protected ILits |
lits |
protected UnitPropagationListener |
solver |
Modifier | Constructor and Description |
---|---|
protected |
AbstractDataStructureFactory() |
Modifier and Type | Method and Description |
---|---|
void |
conflictDetectedInWatchesFor(int p,
int i) |
Constr |
createCardinalityConstraint(IVecInt literals,
int degree)
Create a cardinality constraint of the form sum li >= degree.
|
protected abstract ILits |
createLits() |
Constr |
createUnregisteredCardinalityConstraint(IVecInt literals,
int degree) |
ILits |
getVocabulary() |
IVec<Propagatable> |
getWatchesFor(int p) |
void |
learnConstraint(Constr constr) |
void |
reset() |
void |
setLearner(Learner learner) |
void |
setUnitPropagationListener(UnitPropagationListener s) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createClause, createUnregisteredClause
protected ILits lits
protected UnitPropagationListener solver
protected Learner learner
public void conflictDetectedInWatchesFor(int p, int i)
conflictDetectedInWatchesFor
in interface DataStructureFactory
i
- the index of the conflicting constraintpublic IVec<Propagatable> getWatchesFor(int p)
getWatchesFor
in interface DataStructureFactory
protected abstract ILits createLits()
public ILits getVocabulary()
getVocabulary
in interface DataStructureFactory
public void setUnitPropagationListener(UnitPropagationListener s)
setUnitPropagationListener
in interface DataStructureFactory
public void setLearner(Learner learner)
setLearner
in interface DataStructureFactory
public void reset()
reset
in interface DataStructureFactory
public void learnConstraint(Constr constr)
learnConstraint
in interface DataStructureFactory
public Constr createCardinalityConstraint(IVecInt literals, int degree) throws ContradictionException
DataStructureFactory
createCardinalityConstraint
in interface DataStructureFactory
literals
- a set of literals.degree
- the degree of the cardinality constraint.ContradictionException
public Constr createUnregisteredCardinalityConstraint(IVecInt literals, int degree)
createUnregisteredCardinalityConstraint
in interface DataStructureFactory
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.