View Javadoc

1   /*
2    * Created on 19 fevr. 07
3    *
4    * To change the template for this generated file go to
5    * Window>Preferences>Java>Code Generation>Code and Comments
6    */
7   package org.sat4j.minisat.orders;
8   
9   import org.sat4j.minisat.core.ILits;
10  
11  /**
12   * Heuristics that remembers the latest assignment if any as proposed in Rsat.
13   */
14  public class VarOrderHeapRsat extends VarOrderHeap<ILits> {
15  
16      private static final long serialVersionUID = 1L;
17  
18      @Override
19      public void updateVar(int p) {
20          int var = p >> 1;
21          updateActivity(var);
22          if (heap.inHeap(var))
23              heap.increase(var);
24      }   
25      
26      @Override
27      public void assignLiteral(int p) {
28          phase[p>>1] = p;
29      }
30      
31      @Override
32      public String toString() {
33          return "VSIDS like heuristics from MiniSAT using a heap and lightweight component caching from RSAT"; //$NON-NLS-1$
34      }
35  }