public class CSPInstanceReader extends InstanceReader
Constructor and Description |
---|
CSPInstanceReader(ISolver solver,
boolean allDiffCard) |
Modifier and Type | Method and Description |
---|---|
String |
decode(int[] model)
Deprecated.
|
void |
decode(int[] model,
PrintWriter out)
Produce a model using the reader format on a provided printwriter.
|
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.
|
handleFileName, parseInstance
isVerbose, setVerbosity
public CSPInstanceReader(ISolver solver, boolean allDiffCard)
public IProblem parseInstance(String filename) throws ParseFormatException, IOException, ContradictionException
Reader
parseInstance
in class InstanceReader
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.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 InstanceReader
model
- a model using the Dimacs format.public void decode(int[] model, PrintWriter out)
Reader
decode
in class InstanceReader
model
- a model using the Dimacs format.out
- the place where to display the modelpublic 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)
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.