|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sat4j.reader.Reader
org.sat4j.reader.InstanceReader
public class InstanceReader
An reader having the responsability to choose the right reader according to the input.
| Constructor Summary | |
|---|---|
InstanceReader(ISolver solver)
|
|
| Method Summary | |
|---|---|
String |
decode(int[] model)
Deprecated. |
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(String filename)
This is the usual method to feed a solver with a benchmark. |
| Methods inherited from class org.sat4j.reader.Reader |
|---|
isVerbose, parseInstance, setVerbosity |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InstanceReader(ISolver solver)
| Method Detail |
|---|
public IProblem parseInstance(String filename)
throws FileNotFoundException,
ParseFormatException,
IOException,
ContradictionException
Reader
parseInstance in class Readerfilename - 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.@Deprecated public String decode(int[] model)
Reader
decode in class Readermodel - a model using the Dimacs format.
public void decode(int[] model,
PrintWriter out)
Reader
decode in class Readermodel - a model using the Dimacs format.out - the place where to display the model
public IProblem parseInstance(InputStream in)
throws ParseFormatException,
ContradictionException,
IOException
Reader
parseInstance in class Readerin - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||