org.sat4j.reader
Class CSPReader
java.lang.Object
org.sat4j.reader.Reader
org.sat4j.reader.CSPReader
- Direct Known Subclasses:
- CSPExtSupportReader, CSPSupportReader
public class CSPReader
- extends Reader
This class is a CSP to SAT translator that is able to read
a CSP problem using the First CSP solver competition input
format and that translates it into clausal and cardinality
(equality) constraints.
That code has not been tested very thoroughtly yet and was
written very quickly to meet the competition deadline :=))
There is plenty of room for improvement.
- Author:
- leberre
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSPReader
public CSPReader(ISolver solver)
parseInstance
public final IProblem parseInstance(java.io.Reader in)
throws ParseFormatException,
ContradictionException,
java.io.IOException
- Specified by:
parseInstance
in class Reader
- Throws:
ParseFormatException
ContradictionException
java.io.IOException
decode
public java.lang.String decode(int[] model)
- Description copied from class:
Reader
- Produce a model using the reader format.
- Specified by:
decode
in class Reader
- Parameters:
model
- a model using the Dimacs format.
- Returns:
- a human readable view of the model.