org.sat4j.minisat.constraints
Class AbstractPBDataStructureFactory

java.lang.Object
  extended by org.sat4j.minisat.constraints.AbstractDataStructureFactory<ILits>
      extended by org.sat4j.minisat.constraints.AbstractPBDataStructureFactory
All Implemented Interfaces:
java.io.Serializable, IInternalPBConstraintCreator, DataStructureFactory<ILits>
Direct Known Subclasses:
AbstractPBClauseCardConstrDataStructure, PBMaxDataStructure, PBMinDataStructure, PuebloPBMinDataStructure

public abstract class AbstractPBDataStructureFactory
extends AbstractDataStructureFactory<ILits>
implements IInternalPBConstraintCreator

Author:
leberre To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.sat4j.minisat.constraints.AbstractDataStructureFactory
learner, lits, solver
 
Constructor Summary
AbstractPBDataStructureFactory()
           
 
Method Summary
protected abstract  PBConstr constraintFactory(IVecInt literals, IVec<java.math.BigInteger> coefs, java.math.BigInteger degree)
           
protected abstract  PBConstr constraintFactory(IVecInt literals, IVec<java.math.BigInteger> coefs, boolean moreThan, java.math.BigInteger degree)
           
protected abstract  PBConstr constraintFactory(IVecInt literals, IVecInt coefs, boolean moreThan, int degree)
           
protected abstract  PBConstr constraintFactory(IVecInt literals, IVecInt coefs, int degree)
           
 Constr createCardinalityConstraint(IVecInt literals, int degree)
           
 Constr createClause(IVecInt literals)
           
protected  ILits createLits()
           
 Constr createPseudoBooleanConstraint(IVecInt literals, IVec<java.math.BigInteger> coefs, boolean moreThan, java.math.BigInteger degree)
           
 Constr createUnregisteredClause(IVecInt literals)
           
 Constr createUnregisteredPseudoBooleanConstraint(IVecInt literals, IVec<java.math.BigInteger> coefs, java.math.BigInteger degree)
           
 IConstr createUnregisteredPseudoBooleanConstraint(IVecInt literals, IVec<java.math.BigInteger> coefs, boolean moreThan, java.math.BigInteger degree)
           
 
Methods inherited from class org.sat4j.minisat.constraints.AbstractDataStructureFactory
conflictDetectedInWatchesFor, getVocabulary, getWatchesFor, learnConstraint, reset, setLearner, setUnitPropagationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPBDataStructureFactory

public AbstractPBDataStructureFactory()
Method Detail

createClause

public Constr createClause(IVecInt literals)
                    throws ContradictionException
Specified by:
createClause in interface DataStructureFactory<ILits>
Parameters:
literals - a set of literals using Dimacs format (signed non null integers).
Returns:
null if the constraint is a tautology.
Throws:
ContradictionException - the constraint is trivially unsatisfiable.

createUnregisteredClause

public Constr createUnregisteredClause(IVecInt literals)
Specified by:
createUnregisteredClause in interface DataStructureFactory<ILits>

createCardinalityConstraint

public Constr createCardinalityConstraint(IVecInt literals,
                                          int degree)
                                   throws ContradictionException
Specified by:
createCardinalityConstraint in interface DataStructureFactory<ILits>
Overrides:
createCardinalityConstraint in class AbstractDataStructureFactory<ILits>
Throws:
ContradictionException

createPseudoBooleanConstraint

public Constr createPseudoBooleanConstraint(IVecInt literals,
                                            IVec<java.math.BigInteger> coefs,
                                            boolean moreThan,
                                            java.math.BigInteger degree)
                                     throws ContradictionException
Specified by:
createPseudoBooleanConstraint in interface DataStructureFactory<ILits>
Overrides:
createPseudoBooleanConstraint in class AbstractDataStructureFactory<ILits>
Throws:
ContradictionException

constraintFactory

protected abstract PBConstr constraintFactory(IVecInt literals,
                                              IVecInt coefs,
                                              boolean moreThan,
                                              int degree)
                                       throws ContradictionException
Parameters:
literals - the literals
coefs - the coefficients
moreThan -
degree - the degree of the constraint
Returns:
a new PB constraint
Throws:
ContradictionException

constraintFactory

protected abstract PBConstr constraintFactory(IVecInt literals,
                                              IVec<java.math.BigInteger> coefs,
                                              boolean moreThan,
                                              java.math.BigInteger degree)
                                       throws ContradictionException
Throws:
ContradictionException

createUnregisteredPseudoBooleanConstraint

public Constr createUnregisteredPseudoBooleanConstraint(IVecInt literals,
                                                        IVec<java.math.BigInteger> coefs,
                                                        java.math.BigInteger degree)
Specified by:
createUnregisteredPseudoBooleanConstraint in interface IInternalPBConstraintCreator
Specified by:
createUnregisteredPseudoBooleanConstraint in interface DataStructureFactory<ILits>
Overrides:
createUnregisteredPseudoBooleanConstraint in class AbstractDataStructureFactory<ILits>

createUnregisteredPseudoBooleanConstraint

public IConstr createUnregisteredPseudoBooleanConstraint(IVecInt literals,
                                                         IVec<java.math.BigInteger> coefs,
                                                         boolean moreThan,
                                                         java.math.BigInteger degree)
                                                  throws ContradictionException
Throws:
ContradictionException

constraintFactory

protected abstract PBConstr constraintFactory(IVecInt literals,
                                              IVecInt coefs,
                                              int degree)
Parameters:
literals -
coefs -
degree -
Returns:
a new PB constraint

constraintFactory

protected abstract PBConstr constraintFactory(IVecInt literals,
                                              IVec<java.math.BigInteger> coefs,
                                              java.math.BigInteger degree)

createLits

protected ILits createLits()
Specified by:
createLits in class AbstractDataStructureFactory<ILits>


Copyright © 2007 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.