View Javadoc

1   /*******************************************************************************
2    * SAT4J: a SATisfiability library for Java Copyright (C) 2004-2008 Daniel Le
3    * Berre
4    * 
5    * All rights reserved. This program and the accompanying materials are made
6    * available under the terms of the Eclipse Public License v1.0 which
7    * accompanies this distribution, and is available at
8    * http://www.eclipse.org/legal/epl-v10.html
9    * 
10   * Alternatively, the contents of this file may be used under the terms of
11   * either the GNU Lesser General Public License Version 2.1 or later (the
12   * "LGPL"), in which case the provisions of the LGPL are applicable instead of
13   * those above. If you wish to allow use of your version of this file only under
14   * the terms of the LGPL, and not to allow others to use your version of this
15   * file under the terms of the EPL, indicate your decision by deleting the
16   * provisions above and replace them with the notice and other provisions
17   * required by the LGPL. If you do not delete the provisions above, a recipient
18   * may use your version of this file under the terms of the EPL or the LGPL.
19   * 
20   * Based on the original MiniSat specification from:
21   * 
22   * An extensible SAT solver. Niklas Een and Niklas Sorensson. Proceedings of the
23   * Sixth International Conference on Theory and Applications of Satisfiability
24   * Testing, LNCS 2919, pp 502-518, 2003.
25   * 
26   * See www.minisat.se for the original solver in C++.
27   * 
28   *******************************************************************************/
29  package org.sat4j.minisat.constraints.cnf;
30  
31  import org.sat4j.minisat.core.ILits;
32  import org.sat4j.minisat.core.UnitPropagationListener;
33  import org.sat4j.specs.IVecInt;
34  
35  /**
36   * @since 2.1
37   */
38  public class OriginalBinaryClause extends BinaryClause {
39  
40  	/**
41  	 * 
42  	 */
43  	private static final long serialVersionUID = 1L;
44  
45  	public OriginalBinaryClause(IVecInt ps, ILits voc) {
46  		super(ps, voc);
47  	}
48  
49  	public void setLearnt() {
50  		// do nothing
51  	}
52  
53  	public boolean learnt() {
54  		return false;
55  	}
56  
57  	/**
58  	 * Creates a brand new clause, presumably from external data.
59  	 * 
60  	 * @param s
61  	 *            the object responsible for unit propagation
62  	 * @param voc
63  	 *            the vocabulary
64  	 * @param literals
65  	 *            the literals to store in the clause
66  	 * @return the created clause or null if the clause should be ignored
67  	 *         (tautology for example)
68  	 */
69  	public static OriginalBinaryClause brandNewClause(
70  			UnitPropagationListener s, ILits voc, IVecInt literals) {
71  		OriginalBinaryClause c = new OriginalBinaryClause(literals, voc);
72  		c.register();
73  		return c;
74  	}
75  
76  	public void forwardActivity(double claInc) {
77  		activity += claInc;
78  	}
79  
80  	/**
81  	 * @param claInc
82  	 */
83  	public void incActivity(double claInc) {
84  
85  	}
86  }