org.sat4j.tools.encoding
Class EncodingStrategyAdapter

java.lang.Object
  extended by org.sat4j.tools.encoding.EncodingStrategyAdapter
Direct Known Subclasses:
Binary, Binomial, Commander, Ladder, Policy, Product, Sequential

public abstract class EncodingStrategyAdapter
extends Object

The aim of this class is to use different encodings for specific constraints. The class is abstract because it does not makes sense to use it "as is".

Since:
2.3.1
Author:
sroussel

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

Constructor Detail

EncodingStrategyAdapter

public EncodingStrategyAdapter()
Method Detail

addAtLeast

public IConstr addAtLeast(ISolver solver,
                          IVecInt literals,
                          int degree)
                   throws ContradictionException
Throws:
ContradictionException

addAtLeastOne

public IConstr addAtLeastOne(ISolver solver,
                             IVecInt literals)
                      throws ContradictionException
Throws:
ContradictionException

addAtMost

public IConstr addAtMost(ISolver solver,
                         IVecInt literals,
                         int degree)
                  throws ContradictionException
Throws:
ContradictionException

addAtMostOne

public IConstr addAtMostOne(ISolver solver,
                            IVecInt literals)
                     throws ContradictionException
Throws:
ContradictionException

addExactly

public IConstr addExactly(ISolver solver,
                          IVecInt literals,
                          int degree)
                   throws ContradictionException
Throws:
ContradictionException

addExactlyOne

public IConstr addExactlyOne(ISolver solver,
                             IVecInt literals)
                      throws ContradictionException
Throws:
ContradictionException

toString

public String toString()
Overrides:
toString in class Object


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