|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sat4j.reader.Reader org.sat4j.reader.XMLCSPReader
public class XMLCSPReader
Constructor Summary | |
---|---|
XMLCSPReader(ISolver solver)
|
Method Summary | |
---|---|
String |
decode(int[] model)
Produce a model using the reader format. |
void |
decode(int[] model,
PrintWriter out)
Produce a model using the reader format on a provided printwriter. |
IProblem |
parseInstance(InputStream in)
Read a file from a stream. |
IProblem |
parseInstance(Reader in)
Read a file from a reader. |
IProblem |
parseInstance(String filename)
This is the usual method to feed a solver with a benchmark. |
void |
setVerbosity(boolean b)
|
Methods inherited from class org.sat4j.reader.Reader |
---|
isVerbose |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLCSPReader(ISolver solver)
Method Detail |
---|
public String decode(int[] model)
Reader
decode
in class Reader
model
- a model using the Dimacs format.
public void decode(int[] model, PrintWriter out)
Reader
decode
in class Reader
model
- a model using the Dimacs format.out
- the place where to display the modelpublic IProblem parseInstance(String filename) throws FileNotFoundException, ParseFormatException, IOException, ContradictionException
Reader
parseInstance
in class Reader
filename
- the fully qualified name of the benchmark. The filename
extension may by used to detect which type of benchmarks it is
(SAT, OPB, MAXSAT, etc).
FileNotFoundException
- if the file cannot be found.
ParseFormatException
- if an error occurs during parsing.
IOException
- if an I/O error occurs.
ContradictionException
- if the problem is found trivially inconsistent.public IProblem parseInstance(Reader in) throws ParseFormatException, ContradictionException, IOException
Reader
parseInstance
in class Reader
in
- a stream containing the benchmark.
ParseFormatException
- if an error occurs during parsing.
ContradictionException
- if the problem is found trivially inconsistent.
IOException
- if an I/O error occurs.Reader.parseInstance(InputStream)
public IProblem parseInstance(InputStream in) throws ParseFormatException, ContradictionException, IOException
Reader
parseInstance
in class Reader
in
- a stream containing the benchmark.
ParseFormatException
- if an error occurs during parsing.
ContradictionException
- if the problem is found trivially inconsistent.
IOException
- if an I/O error occurs.public void setVerbosity(boolean b)
setVerbosity
in class Reader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |