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 addAtLeast(ISolver solver, IVecInt literals, int n)
           
 IConstr addAtMost(ISolver solver, IVecInt literals, int k)
           
 IConstr addExactly(ISolver solver, IVecInt literals, int n)
           
 EncodingStrategyAdapter getAtLeastKEncoding()
           
 EncodingStrategyAdapter getAtLeastOneEncoding()
           
 EncodingStrategyAdapter getAtMostKEncoding()
           
 EncodingStrategyAdapter getAtMostOneEncoding()
           
 EncodingStrategyAdapter getExactlyKEncoding()
           
 EncodingStrategyAdapter getExactlyOneEncoding()
           
 void setAtLeastKEncoding(EncodingStrategy atLeastKEncoding)
           
 void setAtLeastKEncoding(EncodingStrategyAdapter atLeastKEncoding)
           
 void setAtLeastOneEncoding(EncodingStrategy atLeastOneEncoding)
           
 void setAtLeastOneEncoding(EncodingStrategyAdapter atLeastOneEncoding)
           
 void setAtMostKEncoding(EncodingStrategy atMostKEncoding)
           
 void setAtMostKEncoding(EncodingStrategyAdapter atMostKEncoding)
           
 void setAtMostOneEncoding(EncodingStrategy atMostOneEncoding)
           
 void setAtMostOneEncoding(EncodingStrategyAdapter atMostOneEncoding)
           
 void setExactlyKEncoding(EncodingStrategy exactlyKEncoding)
           
 void setExactlyKEncoding(EncodingStrategyAdapter exactlyKEncoding)
           
 void setExactlyOneEncoding(EncodingStrategy exactlyOneEncoding)
           
 void setExactlyOneEncoding(EncodingStrategyAdapter exactlyOneEncoding)
           
 
Methods inherited from class org.sat4j.tools.encoding.EncodingStrategyAdapter
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

getAtMostOneEncoding

public EncodingStrategyAdapter getAtMostOneEncoding()

setAtMostOneEncoding

public void setAtMostOneEncoding(EncodingStrategyAdapter atMostOneEncoding)

setAtMostOneEncoding

public void setAtMostOneEncoding(EncodingStrategy atMostOneEncoding)

getAtMostKEncoding

public EncodingStrategyAdapter getAtMostKEncoding()

setAtMostKEncoding

public void setAtMostKEncoding(EncodingStrategyAdapter atMostKEncoding)

setAtMostKEncoding

public void setAtMostKEncoding(EncodingStrategy atMostKEncoding)

getExactlyOneEncoding

public EncodingStrategyAdapter getExactlyOneEncoding()

setExactlyOneEncoding

public void setExactlyOneEncoding(EncodingStrategyAdapter exactlyOneEncoding)

setExactlyOneEncoding

public void setExactlyOneEncoding(EncodingStrategy exactlyOneEncoding)

getExactlyKEncoding

public EncodingStrategyAdapter getExactlyKEncoding()

setExactlyKEncoding

public void setExactlyKEncoding(EncodingStrategyAdapter exactlyKEncoding)

setExactlyKEncoding

public void setExactlyKEncoding(EncodingStrategy exactlyKEncoding)

getAtLeastOneEncoding

public EncodingStrategyAdapter getAtLeastOneEncoding()

setAtLeastOneEncoding

public void setAtLeastOneEncoding(EncodingStrategyAdapter atLeastOneEncoding)

setAtLeastOneEncoding

public void setAtLeastOneEncoding(EncodingStrategy atLeastOneEncoding)

getAtLeastKEncoding

public EncodingStrategyAdapter getAtLeastKEncoding()

setAtLeastKEncoding

public void setAtLeastKEncoding(EncodingStrategyAdapter atLeastKEncoding)

setAtLeastKEncoding

public void setAtLeastKEncoding(EncodingStrategy atLeastKEncoding)

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

addAtLeast

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


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