org.sat4j.pb.constraints
Class AbstractPBDataStructureFactory

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

public abstract class AbstractPBDataStructureFactory
extends AbstractDataStructureFactory<ILits>
implements PBDataStructureFactory<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(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(IDataStructurePB dspb)
           
 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
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 Constr createClause(IVecInt literals)
                    throws ContradictionException
Specified by:
createClause in interface DataStructureFactory<ILits>
Throws:
ContradictionException

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 PBDataStructureFactory<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(IDataStructurePB dspb)

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 PBDataStructureFactory<ILits>

createUnregisteredPseudoBooleanConstraint

public Constr createUnregisteredPseudoBooleanConstraint(IDataStructurePB dspb)
Specified by:
createUnregisteredPseudoBooleanConstraint in interface PBDataStructureFactory<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 © 2009 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.