org.sat4j.minisat.core
Interface Propagatable

All Known Implementing Classes:
AtLeast, AtLeastPB, BinaryClause, HTClause, LearntBinaryClause, LearntBinaryClausePB, LearntHTClause, LearntHTClausePB, LearntWLClause, MaxWatchCard, MaxWatchPb, MaxWatchPbLong, MaxWatchPbLongCP, MinWatchCard, MinWatchCardPB, MinWatchPb, MinWatchPbLong, MinWatchPbLongCP, MinWatchPbLongLimit, OriginalBinaryClause, OriginalBinaryClausePB, OriginalHTClause, OriginalHTClausePB, OriginalWLClause, PuebloMinWatchPb, WatchPb, WatchPbLong, WatchPbLongCP, WLClause

public interface Propagatable

This interface is to be implemented by the classes wanted to be notified of the falsification of a literal.

Author:
leberre

Method Summary
 boolean propagate(UnitPropagationListener s, int p)
          Propagate the truth value of a literal in constraints in which that literal is falsified.
 Constr toConstraint()
          Allow to access a constraint view of the propagatable to avoid casting.
 

Method Detail

propagate

boolean propagate(UnitPropagationListener s,
                  int p)
Propagate the truth value of a literal in constraints in which that literal is falsified.

Parameters:
s - something able to perform unit propagation
p - the literal being propagated. Its negation must appear in the constraint.
Returns:
false iff an inconsistency (a contradiction) is detected.

toConstraint

Constr toConstraint()
Allow to access a constraint view of the propagatable to avoid casting. In most cases, the constraint will implement directly propagatable thus will return itself. It will also also the implementation of more sophisticated watching strategy.

Returns:
the constraint associated to that propagatable.
Since:
2.3.2


Copyright © 2012 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.