org.sat4j.tools.encoding
Class Policy

java.lang.Object
  extended by org.sat4j.tools.encoding.EncodingStrategyAdapter
      extended by org.sat4j.tools.encoding.Policy

public class Policy
extends EncodingStrategyAdapter

This class allows the use of different encodings for different cardinality constraints.

Since:
2.3.1
Author:
stephanieroussel

Constructor Summary
Policy()
           
 
Method Summary
 IConstr addAtMost(ISolver solver, IVecInt literals, int k)
           
 IConstr addExactly(ISolver solver, IVecInt literals, int n)
           
 
Methods inherited from class org.sat4j.tools.encoding.EncodingStrategyAdapter
addAtLeast, addAtLeastOne, addAtMostOne, addExactlyOne, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Policy

public Policy()
Method Detail

addAtMost

public IConstr addAtMost(ISolver solver,
                         IVecInt literals,
                         int k)
                  throws ContradictionException
Overrides:
addAtMost in class EncodingStrategyAdapter
Throws:
ContradictionException

addExactly

public IConstr addExactly(ISolver solver,
                          IVecInt literals,
                          int n)
                   throws ContradictionException
Overrides:
addExactly in class EncodingStrategyAdapter
Throws:
ContradictionException


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