org.sat4j.tools.encoding
Class Ladder
java.lang.Object
org.sat4j.tools.encoding.EncodingStrategyAdapter
org.sat4j.tools.encoding.Ladder
public class Ladder
- extends EncodingStrategyAdapter
For the cases "at most one" and "exactly one", we can use the ladder encoding
described in: I. P. Gent and P. Nightingale,
"A new encoding for AllDifferent into SAT", in International Workshop on
Modeling and Reformulating Constraint Satisfaction Problems, 2004
- Since:
- 2.3.1
- Author:
- sroussel
Ladder
public Ladder()
addAtMostOne
public IConstr addAtMostOne(ISolver solver,
IVecInt literals)
throws ContradictionException
- Overrides:
addAtMostOne
in class EncodingStrategyAdapter
- Throws:
ContradictionException
addExactlyOne
public IConstr addExactlyOne(ISolver solver,
IVecInt literals)
throws ContradictionException
- Overrides:
addExactlyOne
in class EncodingStrategyAdapter
- Throws:
ContradictionException
Copyright © 2011 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.