public final class LiteralsUtils extends Object
int p : a literal (p>1) p ˆ 1 : the negation of the literal p >> 1 : the DIMACS number representing the variable. int v : a DIMACS variable (v>0) v << 1 : a positive literal for that variable in the solver. v << 1 ˆ 1 : a negative literal for that variable.
| Modifier and Type | Method and Description | 
|---|---|
| static int | neg(int p)Returns the opposite literal. | 
| static int | negLit(int var)Returns the negative literal associated with a variable. | 
| static int | posLit(int var)Returns the positive literal associated with a variable. | 
| static int | toDimacs(int p)decode the internal representation of a literal in internal
 representation into Dimacs format. | 
| static int | toInternal(int x)encode the classical Dimacs representation (negated integers for negated
 literals) into the internal format. | 
| static int | var(int p)Returns the variable associated to the literal | 
public static int var(int p)
p - a literal in internal representationpublic static int neg(int p)
p - a literal in internal representationpublic static int posLit(int var)
var - a variable in Dimacs formatpublic static int negLit(int var)
var - a variable in Dimacs formatpublic static int toDimacs(int p)
p - the literal in internal representationpublic static int toInternal(int x)
x - the literal in Dimacs formatCopyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.