org.sat4j.reader
Class InstanceReader

java.lang.Object
  extended by org.sat4j.reader.Reader
      extended by org.sat4j.reader.InstanceReader

public class InstanceReader
extends Reader

An reader having the responsability to choose the right reader according to the input.

Author:
leberre

Constructor Summary
InstanceReader(ISolver solver)
           
 
Method Summary
 java.lang.String decode(int[] model)
          Produce a model using the reader format.
 IProblem parseInstance(java.io.Reader in)
           
 IProblem parseInstance(java.lang.String filename)
           
 
Methods inherited from class org.sat4j.reader.Reader
parseInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceReader

public InstanceReader(ISolver solver)
Method Detail

parseInstance

public IProblem parseInstance(java.lang.String filename)
                       throws java.io.FileNotFoundException,
                              ParseFormatException,
                              java.io.IOException,
                              ContradictionException
Overrides:
parseInstance in class Reader
Throws:
java.io.FileNotFoundException
ParseFormatException
java.io.IOException
ContradictionException

decode

public java.lang.String decode(int[] model)
Description copied from class: Reader
Produce a model using the reader format.

Specified by:
decode in class Reader
Parameters:
model - a model using the Dimacs format.
Returns:
a human readable view of the model.

parseInstance

public IProblem parseInstance(java.io.Reader in)
                       throws ParseFormatException,
                              ContradictionException,
                              java.io.IOException
Specified by:
parseInstance in class Reader
Throws:
ParseFormatException
ContradictionException
java.io.IOException