choco.cp.solver.constraints.integer.bool.sat
Class Lits

java.lang.Object
  extended by choco.cp.solver.constraints.integer.bool.sat.Lits

public final class Lits
extends Object

A literal is a boolean variable or its negation This structure stores the lists of watched literals to ensure propagation of clauses


Field Summary
protected  IntDomainVar[] boolvars
           
protected  int nblits
           
protected  Vec<WLClause>[] negwatches
           
protected  Vec<WLClause>[] poswatches
           
 
Constructor Summary
Lits()
           
 
Method Summary
 void init(IntDomainVar[] vars)
           
 Boolean isEntailed(int lit)
           
 boolean isFalsified(int lit)
           
 boolean isFree(int lit)
           
static boolean isPositive(int lit)
           
 boolean isSatisfied(int lit)
           
static boolean isSatisfied(int lit, int val)
           
 Vec<WLClause> neg_watches(int idx)
           
 Vec<WLClause> pos_watches(int idx)
           
 void reset()
           
 void unwatch(int lit, int idxClause)
           
 void unwatch(int lit, WLClause c)
           
 void watch(int lit, WLClause c)
           
 Vec<WLClause> watches(int lit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nblits

protected int nblits

boolvars

protected IntDomainVar[] boolvars

poswatches

protected Vec<WLClause>[] poswatches

negwatches

protected Vec<WLClause>[] negwatches
Constructor Detail

Lits

public Lits()
Method Detail

init

public void init(IntDomainVar[] vars)

isFree

public boolean isFree(int lit)

isFalsified

public boolean isFalsified(int lit)

isSatisfied

public boolean isSatisfied(int lit)

isEntailed

public Boolean isEntailed(int lit)

isSatisfied

public static boolean isSatisfied(int lit,
                                  int val)

isPositive

public static boolean isPositive(int lit)

watch

public void watch(int lit,
                  WLClause c)

unwatch

public void unwatch(int lit,
                    WLClause c)

unwatch

public void unwatch(int lit,
                    int idxClause)

pos_watches

public Vec<WLClause> pos_watches(int idx)

neg_watches

public Vec<WLClause> neg_watches(int idx)

watches

public Vec<WLClause> watches(int lit)

reset

public void reset()


Copyright © 2012. All Rights Reserved.