org.sat4j.pb.constraints
Class AbstractPBDataStructureFactory

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

public abstract class AbstractPBDataStructureFactory
extends org.sat4j.minisat.constraints.AbstractDataStructureFactory<org.sat4j.minisat.core.ILits>
implements PBDataStructureFactory<org.sat4j.minisat.core.ILits>, 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(IDataStructurePB dspb)
           
protected abstract  PBConstr constraintFactory(org.sat4j.specs.IVecInt literals, org.sat4j.specs.IVec<java.math.BigInteger> coefs, java.math.BigInteger degree)
           
protected abstract  PBConstr constraintFactory(org.sat4j.specs.IVecInt literals, org.sat4j.specs.IVec<java.math.BigInteger> coefs, boolean moreThan, java.math.BigInteger degree)
           
protected abstract  PBConstr constraintFactory(org.sat4j.specs.IVecInt literals, org.sat4j.specs.IVecInt coefs, boolean moreThan, int degree)
           
protected abstract  PBConstr constraintFactory(org.sat4j.specs.IVecInt literals, org.sat4j.specs.IVecInt coefs, int degree)
           
 org.sat4j.minisat.core.Constr createCardinalityConstraint(org.sat4j.specs.IVecInt literals, int degree)
           
 org.sat4j.minisat.core.Constr createClause(org.sat4j.specs.IVecInt literals)
           
protected  org.sat4j.minisat.core.ILits createLits()
           
 org.sat4j.minisat.core.Constr createPseudoBooleanConstraint(org.sat4j.specs.IVecInt literals, org.sat4j.specs.IVec<java.math.BigInteger> coefs, boolean moreThan, java.math.BigInteger degree)
           
 org.sat4j.minisat.core.Constr createUnregisteredClause(org.sat4j.specs.IVecInt literals)
           
 org.sat4j.minisat.core.Constr createUnregisteredPseudoBooleanConstraint(IDataStructurePB dspb)
           
 org.sat4j.minisat.core.Constr createUnregisteredPseudoBooleanConstraint(org.sat4j.specs.IVecInt literals, org.sat4j.specs.IVec<java.math.BigInteger> coefs, java.math.BigInteger degree)
           
 org.sat4j.specs.IConstr createUnregisteredPseudoBooleanConstraint(org.sat4j.specs.IVecInt literals, org.sat4j.specs.IVec<java.math.BigInteger> coefs, boolean moreThan, java.math.BigInteger degree)
           
 
Methods inherited from class org.sat4j.minisat.constraints.AbstractDataStructureFactory
conflictDetectedInAttachesFor, getAttachesFor, getVocabulary, learnConstraint, reset, setLearner, setUnitPropagationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sat4j.minisat.core.DataStructureFactory
conflictDetectedInAttachesFor, getAttachesFor, getVocabulary, learnConstraint, reset, setLearner, setUnitPropagationListener
 

Constructor Detail

AbstractPBDataStructureFactory

public AbstractPBDataStructureFactory()
Method Detail

createClause

public org.sat4j.minisat.core.Constr createClause(org.sat4j.specs.IVecInt literals)
                                           throws org.sat4j.specs.ContradictionException
Specified by:
createClause in interface org.sat4j.minisat.core.DataStructureFactory<org.sat4j.minisat.core.ILits>
Throws:
org.sat4j.specs.ContradictionException

createUnregisteredClause

public org.sat4j.minisat.core.Constr createUnregisteredClause(org.sat4j.specs.IVecInt literals)
Specified by:
createUnregisteredClause in interface org.sat4j.minisat.core.DataStructureFactory<org.sat4j.minisat.core.ILits>

createCardinalityConstraint

public org.sat4j.minisat.core.Constr createCardinalityConstraint(org.sat4j.specs.IVecInt literals,
                                                                 int degree)
                                                          throws org.sat4j.specs.ContradictionException
Specified by:
createCardinalityConstraint in interface org.sat4j.minisat.core.DataStructureFactory<org.sat4j.minisat.core.ILits>
Overrides:
createCardinalityConstraint in class org.sat4j.minisat.constraints.AbstractDataStructureFactory<org.sat4j.minisat.core.ILits>
Throws:
org.sat4j.specs.ContradictionException

createPseudoBooleanConstraint

public org.sat4j.minisat.core.Constr createPseudoBooleanConstraint(org.sat4j.specs.IVecInt literals,
                                                                   org.sat4j.specs.IVec<java.math.BigInteger> coefs,
                                                                   boolean moreThan,
                                                                   java.math.BigInteger degree)
                                                            throws org.sat4j.specs.ContradictionException
Specified by:
createPseudoBooleanConstraint in interface PBDataStructureFactory<org.sat4j.minisat.core.ILits>
Throws:
org.sat4j.specs.ContradictionException

constraintFactory

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

constraintFactory

protected abstract PBConstr constraintFactory(IDataStructurePB dspb)

constraintFactory

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

createUnregisteredPseudoBooleanConstraint

public org.sat4j.minisat.core.Constr createUnregisteredPseudoBooleanConstraint(org.sat4j.specs.IVecInt literals,
                                                                               org.sat4j.specs.IVec<java.math.BigInteger> coefs,
                                                                               java.math.BigInteger degree)
Specified by:
createUnregisteredPseudoBooleanConstraint in interface IInternalPBConstraintCreator
Specified by:
createUnregisteredPseudoBooleanConstraint in interface PBDataStructureFactory<org.sat4j.minisat.core.ILits>

createUnregisteredPseudoBooleanConstraint

public org.sat4j.minisat.core.Constr createUnregisteredPseudoBooleanConstraint(IDataStructurePB dspb)
Specified by:
createUnregisteredPseudoBooleanConstraint in interface PBDataStructureFactory<org.sat4j.minisat.core.ILits>

createUnregisteredPseudoBooleanConstraint

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

constraintFactory

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

constraintFactory

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

createLits

protected org.sat4j.minisat.core.ILits createLits()
Specified by:
createLits in class org.sat4j.minisat.constraints.AbstractDataStructureFactory<org.sat4j.minisat.core.ILits>


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