org.sat4j.tools.encoding
Class Binary
java.lang.Object
org.sat4j.tools.encoding.EncodingStrategyAdapter
org.sat4j.tools.encoding.Binary
public class Binary
- extends EncodingStrategyAdapter
For the case "at most one", we can use the binary encoding (also called
birwise encoding) first described in A. M. Frisch, T. J. Peugniez, A. J.
Dogget and P. Nightingale, "Solving Non-Boolean Satisfiability Problems With
Stochastic Local Search: A Comparison of Encodings" in Journal of Automated
Reasoning, vol. 35, n� 1-3, 2005
- Since:
- 2.3.1
- Author:
- sroussel
Binary
public Binary()
addAtMostOne
public IConstr addAtMostOne(ISolver solver,
IVecInt literals)
throws ContradictionException
- p being the smaller integer greater than log_2(n), this encoding adds p
variables and n*p clauses.
- Overrides:
addAtMostOne
in class EncodingStrategyAdapter
- Throws:
ContradictionException
addAtMost
public IConstr addAtMost(ISolver solver,
IVecInt literals,
int degree)
throws ContradictionException
- Overrides:
addAtMost
in class EncodingStrategyAdapter
- Throws:
ContradictionException
Copyright © 2011 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.