org.sat4j.pb.constraints.pb
Class MinWatchPb

java.lang.Object
  extended by org.sat4j.pb.constraints.pb.WatchPb
      extended by org.sat4j.pb.constraints.pb.MinWatchPb
All Implemented Interfaces:
java.io.Serializable, Constr, Propagatable, Undoable, PBConstr, IConstr
Direct Known Subclasses:
PuebloMinWatchPb

public class MinWatchPb
extends WatchPb

See Also:
Serialized Form

Field Summary
protected  boolean[] watched
          Liste des indices des litt???
protected  int[] watching
          Sert ???
protected  int watchingCount
          Liste des indices des litt???
 
Fields inherited from class org.sat4j.pb.constraints.pb.WatchPb
activity, ATLEAST, ATMOST, coefs, degree, learnt, lits, voc, watchCumul
 
Constructor Summary
protected MinWatchPb(ILits voc, IDataStructurePB mpb)
          Constructeur de base des contraintes
protected MinWatchPb(ILits voc, int[] lits, java.math.BigInteger[] coefs, java.math.BigInteger degree)
           
 
Method Summary
protected  void computePropagation(UnitPropagationListener s)
           
protected  void computeWatches()
           
protected  java.math.BigInteger maximalCoefficient(int pIndice)
           
protected  int nbOfWatched()
          Nombre de litt???
static MinWatchPb normalizedMinWatchPbNew(UnitPropagationListener s, ILits voc, int[] lits, java.math.BigInteger[] coefs, java.math.BigInteger degree)
           
static WatchPb normalizedWatchPbNew(ILits voc, IDataStructurePB mpb)
           
 boolean propagate(UnitPropagationListener s, int p)
          Propagation de la valeur de v???
 void remove(UnitPropagationListener upl)
          Enl???
 void undo(int p)
          M???
protected  java.math.BigInteger updateWatched(java.math.BigInteger mc, int pIndice)
           
 
Methods inherited from class org.sat4j.pb.constraints.pb.WatchPb
assertConstraint, calcReason, coefficientsEqualToOne, computeAnImpliedClause, equals, forwardActivity, get, getActivity, getCoef, getCoefs, getDegree, getLits, getVocabulary, hashCode, incActivity, isAssertive, isSatisfiable, learnt, locked, ppcm, recalcLeftSide, recalcLeftSide, register, rescaleBy, setLearnt, simplify, size, slackConstraint, slackConstraint, sort, sort, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

watched

protected boolean[] watched
Liste des indices des litt???raux regardant la contrainte


watching

protected int[] watching
Sert ??? d???terminer si la clause est watched par le litt???ral


watchingCount

protected int watchingCount
Liste des indices des litt???raux regardant la contrainte

Constructor Detail

MinWatchPb

protected MinWatchPb(ILits voc,
                     IDataStructurePB mpb)
Constructeur de base des contraintes

Parameters:
voc - Informations sur le vocabulaire employ???
mpb - a mutable PB constraint

MinWatchPb

protected MinWatchPb(ILits voc,
                     int[] lits,
                     java.math.BigInteger[] coefs,
                     java.math.BigInteger degree)
Method Detail

computeWatches

protected void computeWatches()
                       throws ContradictionException
Specified by:
computeWatches in class WatchPb
Throws:
ContradictionException

computePropagation

protected void computePropagation(UnitPropagationListener s)
                           throws ContradictionException
Specified by:
computePropagation in class WatchPb
Throws:
ContradictionException

normalizedMinWatchPbNew

public static MinWatchPb normalizedMinWatchPbNew(UnitPropagationListener s,
                                                 ILits voc,
                                                 int[] lits,
                                                 java.math.BigInteger[] coefs,
                                                 java.math.BigInteger degree)
                                          throws ContradictionException
Parameters:
s - a unit propagation listener
voc - the vocabulary
lits - the literals
coefs - the coefficients
degree - the degree of the constraint to normalize.
Returns:
a new PB constraint or null if a trivial inconsistency is detected.
Throws:
ContradictionException

nbOfWatched

protected int nbOfWatched()
Nombre de litt???raux actuellement observ???

Returns:
nombre de litt???raux regard???s

propagate

public boolean propagate(UnitPropagationListener s,
                         int p)
Propagation de la valeur de v???rit??? d'un litt???ral falsifi???

Parameters:
s - un prouveur
p - le litt???ral propag??? (il doit etre falsifie)
Returns:
false ssi une inconsistance est d???t???ct???e

remove

public void remove(UnitPropagationListener upl)
Enl???ve une contrainte du prouveur


undo

public void undo(int p)
M???thode appel???e lors du backtrack

Parameters:
p - un litt???ral d???saffect???

normalizedWatchPbNew

public static WatchPb normalizedWatchPbNew(ILits voc,
                                           IDataStructurePB mpb)

maximalCoefficient

protected java.math.BigInteger maximalCoefficient(int pIndice)
Parameters:
pIndice - propagated literal : its coefficient is excluded from the search of the maximal coefficient
Returns:
the maximal coefficient for the watched literals

updateWatched

protected java.math.BigInteger updateWatched(java.math.BigInteger mc,
                                             int pIndice)


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