View Javadoc

1   package org.sat4j.pb.constraints.pb;
2   
3   import java.math.BigInteger;
4   
5   import org.sat4j.minisat.constraints.cnf.UnitClause;
6   import org.sat4j.minisat.core.ILits;
7   import org.sat4j.specs.IVecInt;
8   
9   public final class UnitClausePB extends UnitClause implements PBConstr {
10  
11  	private final ILits voc;
12  
13  	public UnitClausePB(int value, ILits voc) {
14  		super(value);
15  		this.voc = voc;
16  	}
17  
18  	/**
19       * 
20       */
21  	private static final long serialVersionUID = 1L;
22  
23  	public IVecInt computeAnImpliedClause() {
24  		return null;
25  	}
26  
27  	public BigInteger getCoef(int p) {
28  		return BigInteger.ONE;
29  	}
30  
31  	public BigInteger[] getCoefs() {
32  		return new BigInteger[] { BigInteger.ONE };
33  	}
34  
35  	public BigInteger getDegree() {
36  		return BigInteger.ONE;
37  	}
38  
39  	public int[] getLits() {
40  		return new int[] { literal };
41  	}
42  
43  	public ILits getVocabulary() {
44  		return voc;
45  	}
46  
47  }