Clover coverage report -
Coverage timestamp: jeu. juin 15 2006 08:24:33 CEST
file stats: LOC: 96   Methods: 10
NCLOC: 52   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
MixableCBClausePB.java 83,3% 90% 80% 86,1%
coverage coverage
 1    package org.sat4j.minisat.constraints.pb;
 2   
 3    import java.math.BigInteger;
 4   
 5    import org.sat4j.minisat.constraints.cnf.MixableCBClause;
 6    import org.sat4j.minisat.core.ILits;
 7    import org.sat4j.minisat.core.UnitPropagationListener;
 8    import org.sat4j.specs.IVecInt;
 9   
 10    public class MixableCBClausePB extends MixableCBClause implements PBConstr{
 11   
 12    /**
 13    *
 14    */
 15    private static final long serialVersionUID = 1L;
 16   
 17  0 public MixableCBClausePB(IVecInt ps, ILits voc, boolean learnt) {
 18  0 super(ps, voc, learnt);
 19    }
 20   
 21  92253 public MixableCBClausePB(IVecInt ps, ILits voc) {
 22  92253 super(ps, voc);
 23    }
 24   
 25  73623 public static MixableCBClausePB brandNewClause(UnitPropagationListener s, ILits voc,
 26    IVecInt literals) {
 27  73623 MixableCBClausePB c = new MixableCBClausePB(literals, voc);
 28  73623 c.register();
 29  73623 return c;
 30    }
 31   
 32   
 33   
 34    /* (non-Javadoc)
 35    * @see org.sat4j.minisat.constraints.pb.PBConstr#computeAnImpliedClause()
 36    */
 37  0 public IVecInt computeAnImpliedClause() {
 38  0 return null;
 39    }
 40   
 41    /* (non-Javadoc)
 42    * @see org.sat4j.minisat.constraints.pb.PBConstr#getCoef(int)
 43    */
 44  2383083 public BigInteger getCoef(int literal) {
 45  2383083 return BigInteger.ONE;
 46    }
 47   
 48    /* (non-Javadoc)
 49    * @see org.sat4j.minisat.constraints.pb.PBConstr#getCoefs()
 50    */
 51  24851 public BigInteger[] getCoefs() {
 52  24851 BigInteger[] tmp = new BigInteger[size()];
 53  24851 for (int i = 0; i < tmp.length; i++)
 54  390440 tmp[i] = BigInteger.ONE;
 55  24851 return tmp;
 56    }
 57   
 58    /* (non-Javadoc)
 59    * @see org.sat4j.minisat.constraints.pb.PBConstr#getDegree()
 60    */
 61  213714 public BigInteger getDegree() {
 62  213714 return BigInteger.ONE;
 63    }
 64   
 65    /* (non-Javadoc)
 66    * @see org.sat4j.minisat.constraints.pb.PBConstr#getLits()
 67    */
 68  24851 public int[] getLits() {
 69  24851 int[] tmp = new int[size()];
 70  24851 System.arraycopy(lits, 0, tmp, 0, size());
 71  24851 return tmp;
 72    }
 73   
 74    /* (non-Javadoc)
 75    * @see org.sat4j.minisat.constraints.pb.PBConstr#getVocabulary()
 76    */
 77  272326 public ILits getVocabulary() {
 78  272326 return voc;
 79    }
 80   
 81    /*
 82    * (non-Javadoc)
 83    *
 84    * @see org.sat4j.minisat.core.Constr#assertConstraint(org.sat4j.minisat.core.UnitPropagationListener)
 85    */
 86  18630 public void assertConstraint(UnitPropagationListener s) {
 87  247475 for (int i = 0; i < size(); i++)
 88  247475 if (getVocabulary().isUnassigned(get(i))) {
 89  18630 boolean ret = s.enqueue(get(i), this);
 90    assert ret;
 91  18630 break;
 92    }
 93    }
 94   
 95   
 96    }