|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sat4j.reader.Reader
public abstract class Reader
A reader is responsible to feed an ISolver from a text file and to convert the model found by the solver to a textual representation.
| Constructor Summary | |
|---|---|
Reader()
|
|
| Method Summary | |
|---|---|
abstract String |
decode(int[] model)
Deprecated. |
abstract void |
decode(int[] model,
PrintWriter out)
Produce a model using the reader format on a provided printwriter. |
boolean |
isVerbose()
|
abstract IProblem |
parseInstance(InputStream in)
Read a file from a stream. |
IProblem |
parseInstance(Reader in)
Deprecated. |
IProblem |
parseInstance(String filename)
This is the usual method to feed a solver with a benchmark. |
void |
setVerbosity(boolean b)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Reader()
| Method Detail |
|---|
public IProblem parseInstance(String filename)
throws FileNotFoundException,
ParseFormatException,
IOException,
ContradictionException
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 abstract IProblem parseInstance(InputStream in)
throws ParseFormatException,
ContradictionException,
IOException
in - a stream containing the benchmark.
ParseFormatException - if an error occurs during parsing.
IOException - if an I/O error occurs.
ContradictionException - if the problem is found trivially inconsistent.
@Deprecated
public IProblem parseInstance(Reader in)
throws ParseFormatException,
ContradictionException,
IOException
in - a stream containing the benchmark.
ParseFormatException - if an error occurs during parsing.
IOException - if an I/O error occurs.
ContradictionException - if the problem is found trivially inconsistent.parseInstance(InputStream)@Deprecated public abstract String decode(int[] model)
model - a model using the Dimacs format.
public abstract void decode(int[] model,
PrintWriter out)
model - a model using the Dimacs format.out - the place where to display the modelpublic boolean isVerbose()
public void setVerbosity(boolean b)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||