org.sat4j.pb.constraints.pb
Class MinWatchCardPB

java.lang.Object
  extended by org.sat4j.minisat.constraints.card.MinWatchCard
      extended by org.sat4j.pb.constraints.pb.MinWatchCardPB
All Implemented Interfaces:
java.io.Serializable, Constr, Propagatable, Undoable, PBConstr, IConstr

public class MinWatchCardPB
extends MinWatchCard
implements PBConstr

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.sat4j.minisat.constraints.card.MinWatchCard
ATLEAST, ATMOST, watchCumul
 
Constructor Summary
MinWatchCardPB(ILits voc, IVecInt ps, boolean moreThan, int degree)
           
MinWatchCardPB(ILits voc, IVecInt ps, int degree)
           
 
Method Summary
 void assertConstraint(UnitPropagationListener s)
           
 IVecInt computeAnImpliedClause()
           
 java.math.BigInteger getCoef(int literal)
           
 java.math.BigInteger[] getCoefs()
           
 java.math.BigInteger getDegree()
           
 boolean learnt()
          D?
static MinWatchCardPB minWatchCardPBNew(UnitPropagationListener s, ILits voc, IVecInt ps, boolean moreThan, int degree)
          Permet la cr?
static MinWatchCardPB normalizedMinWatchCardPBNew(UnitPropagationListener s, ILits voc, IVecInt ps, int degree)
          Permet la cr?
 void register()
           
 void setLearnt()
           
 
Methods inherited from class org.sat4j.minisat.constraints.card.MinWatchCard
calcReason, computePropagation, computeWatches, equals, forwardActivity, get, getActivity, getLits, getVocabulary, hashCode, incActivity, linearisation, locked, minWatchCardNew, normalize, propagate, remove, rescaleBy, simplify, size, toString, undo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.sat4j.pb.constraints.pb.PBConstr
getLits, getVocabulary
 
Methods inherited from interface org.sat4j.minisat.core.Constr
calcReason, forwardActivity, incActivity, locked, remove, rescaleBy, simplify
 
Methods inherited from interface org.sat4j.minisat.core.Propagatable
propagate
 
Methods inherited from interface org.sat4j.specs.IConstr
get, getActivity, size
 

Constructor Detail

MinWatchCardPB

public MinWatchCardPB(ILits voc,
                      IVecInt ps,
                      boolean moreThan,
                      int degree)

MinWatchCardPB

public MinWatchCardPB(ILits voc,
                      IVecInt ps,
                      int degree)
Method Detail

getCoef

public java.math.BigInteger getCoef(int literal)
Specified by:
getCoef in interface PBConstr

getDegree

public java.math.BigInteger getDegree()
Specified by:
getDegree in interface PBConstr

getCoefs

public java.math.BigInteger[] getCoefs()
Specified by:
getCoefs in interface PBConstr

normalizedMinWatchCardPBNew

public static MinWatchCardPB normalizedMinWatchCardPBNew(UnitPropagationListener s,
                                                         ILits voc,
                                                         IVecInt ps,
                                                         int degree)
                                                  throws ContradictionException
Permet la cr?ation de contrainte de cardinalit? ? observation minimale

Parameters:
s - outil pour la propagation des litt?raux
voc - vocabulaire utilis? par la contrainte
ps - liste des litt?raux de la nouvelle contrainte
degree - fournit le degr? de la contrainte
Returns:
une nouvelle clause si tout va bien, null sinon
Throws:
ContradictionException

minWatchCardPBNew

public static MinWatchCardPB minWatchCardPBNew(UnitPropagationListener s,
                                               ILits voc,
                                               IVecInt ps,
                                               boolean moreThan,
                                               int degree)
                                        throws ContradictionException
Permet la cr?ation de contrainte de cardinalit? ? observation minimale

Parameters:
s - outil pour la propagation des litt?raux
voc - vocabulaire utilis? par la contrainte
ps - liste des litt?raux de la nouvelle contrainte
moreThan - d?termine si c'est une sup?rieure ou ?gal ? l'origine
degree - fournit le degr? de la contrainte
Returns:
une nouvelle clause si tout va bien, null sinon
Throws:
ContradictionException

learnt

public boolean learnt()
D?termine si la contrainte est apprise

Specified by:
learnt in interface IConstr
Overrides:
learnt in class MinWatchCard
Returns:
true si la contrainte est apprise, false sinon
See Also:
IConstr.learnt()

setLearnt

public void setLearnt()
Specified by:
setLearnt in interface Constr
Overrides:
setLearnt in class MinWatchCard

register

public void register()
Specified by:
register in interface Constr
Overrides:
register in class MinWatchCard

assertConstraint

public void assertConstraint(UnitPropagationListener s)
Specified by:
assertConstraint in interface Constr
Overrides:
assertConstraint in class MinWatchCard

computeAnImpliedClause

public IVecInt computeAnImpliedClause()
Specified by:
computeAnImpliedClause in interface PBConstr


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