public class InstanceReader extends Reader
Constructor and Description |
---|
InstanceReader(ISolver solver) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
decode(int[] model)
Deprecated.
|
void |
decode(int[] model,
java.io.PrintWriter out)
Produce a model using the reader format on a provided printwriter.
|
protected Reader |
handleFileName(java.lang.String fname,
java.lang.String prefix) |
IProblem |
parseInstance(java.io.InputStream in)
Read a file from a stream.
|
IProblem |
parseInstance(java.lang.String filename)
This is the usual method to feed a solver with a benchmark.
|
isVerbose, parseInstance, setVerbosity
public InstanceReader(ISolver solver)
public IProblem parseInstance(java.lang.String filename) throws ParseFormatException, java.io.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).ParseFormatException
- if an error occurs during parsing.java.io.IOException
- if an I/O error occurs.ContradictionException
- if the problem is found trivially inconsistent.protected Reader handleFileName(java.lang.String fname, java.lang.String prefix)
@Deprecated public java.lang.String decode(int[] model)
Reader
public void decode(int[] model, java.io.PrintWriter out)
Reader
public IProblem parseInstance(java.io.InputStream in) throws ParseFormatException, ContradictionException, java.io.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.java.io.IOException
- if an I/O error occurs.