Clover coverage report -
Coverage timestamp: jeu. juil. 14 2005 00:14:10 CEST
file stats: LOC: 29   Methods: 2
NCLOC: 19   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ObjectifFunction.java 0% 0% 0% 0%
coverage
 1    package org.sat4j.reader;
 2   
 3    import java.math.BigInteger;
 4   
 5    import org.sat4j.specs.IVec;
 6   
 7    public class ObjectifFunction {
 8   
 9    // contains the coeffs of the objective function for each variable
 10    private final IVec<BigInteger> coeffs;
 11   
 12  0 public ObjectifFunction(IVec<BigInteger> coeffs) {
 13  0 this.coeffs = coeffs;
 14    }
 15   
 16    // calculate the degree of the objectif function
 17  0 public BigInteger calculateDegree(int[] model) {
 18    assert coeffs.size() == model.length;
 19  0 BigInteger tempDegree = BigInteger.ZERO;
 20   
 21  0 for (int i = 0; i < coeffs.size(); i++) {
 22  0 if (model[i] > 0) {
 23  0 tempDegree = tempDegree.add(coeffs.get(i));
 24    }
 25    }
 26  0 return tempDegree;
 27    }
 28   
 29    }