org.sat4j.reader
Class GoodOPBReader

java.lang.Object
  extended by org.sat4j.reader.Reader
      extended by org.sat4j.reader.GoodOPBReader
All Implemented Interfaces:
java.io.Serializable

public class GoodOPBReader
extends Reader
implements java.io.Serializable

This class is a quick hack to read opb formatted files. The reader skip commented lines (beginning with COMMENT_SYMBOL) and expect constraints of the form: [name :] [[+|-]COEF] [*] [+|-]LIT >=|<=|= DEGREE where COEF and DEGREE are plain integer and LIT is an identifier.

Author:
leberre
See Also:
Serialized Form

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

Constructor Detail

GoodOPBReader

public GoodOPBReader(ISolver solver)
Method Detail

parseInstance

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

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.