org.sat4j.reader
Class OPBReader2005

java.lang.Object
  extended by org.sat4j.reader.Reader
      extended by org.sat4j.reader.OPBReader2005
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
OPBReader2006

public class OPBReader2005
extends Reader
implements java.io.Serializable

"Official" reader for the Pseudo Boolean evaluation 2005.

Author:
leberre, or, mederic baron
See Also:
Serialized Form

Constructor Summary
OPBReader2005(ISolver solver)
           
 
Method Summary
 java.lang.String decode(int[] model)
          Produce a model using the reader format.
 IVec<java.math.BigInteger> getCoeffs()
           
 ObjectiveFunction getObjectiveFunction()
           
 IVecInt getVars()
           
 void parse()
          parses the file and uses the callbacks to send to send the data back to the program
 IProblem parseInstance(java.io.Reader in)
           
 void readInteger(java.lang.StringBuffer s)
          read a integer from file
 java.lang.String readWord()
          read a word from file
 
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

OPBReader2005

public OPBReader2005(ISolver solver)
Method Detail

getVars

public IVecInt getVars()

getCoeffs

public IVec<java.math.BigInteger> getCoeffs()

readWord

public java.lang.String readWord()
                          throws java.io.IOException
read a word from file

Returns:
the word we read
Throws:
java.io.IOException

readInteger

public void readInteger(java.lang.StringBuffer s)
                 throws java.io.IOException
read a integer from file

Parameters:
s - a StringBuffer to store the integer that was read
Throws:
java.io.IOException

parse

public void parse()
           throws java.io.IOException,
                  ParseFormatException,
                  ContradictionException
parses the file and uses the callbacks to send to send the data back to the program

Throws:
java.io.IOException
ParseException
ContradictionException
ParseFormatException

parseInstance

public final IProblem parseInstance(java.io.Reader in)
                             throws ParseFormatException,
                                    ContradictionException
Specified by:
parseInstance in class Reader
Throws:
ParseFormatException
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.

getObjectiveFunction

public ObjectiveFunction getObjectiveFunction()