org.sat4j.pb.reader
Class OPBReader2010

java.lang.Object
  extended by org.sat4j.reader.Reader
      extended by org.sat4j.pb.reader.OPBReader2005
          extended by org.sat4j.pb.reader.OPBReader2006
              extended by org.sat4j.pb.reader.OPBReader2007
                  extended by org.sat4j.pb.reader.OPBReader2010
All Implemented Interfaces:
Serializable

public class OPBReader2010
extends OPBReader2007

Since:
2.2
See Also:
Serialized Form

Field Summary
static BigInteger SAT4J_MAX_BIG_INTEGER
           
 
Fields inherited from class org.sat4j.pb.reader.OPBReader2007
nbNewSymbols
 
Fields inherited from class org.sat4j.pb.reader.OPBReader2005
coeffs, d, hasObjFunc, hasVariablesExplanation, lits, nbConstr, nbConstraintsRead, nbVars, operator, solver
 
Constructor Summary
OPBReader2010(IPBSolver solver)
           
 
Method Summary
protected  void beginConstraint()
          callback called before we read a constraint
protected  void endConstraint()
           
 IProblem parseInstance(Reader input)
          Read a file from a reader.
protected  void readMetaData()
          read the first comment line to get the number of variables and the number of constraints in the file calls metaData with the data that was read
protected  void readObjective()
          read the objective line (if any) calls beginObjective, objectiveTerm and endObjective
 
Methods inherited from class org.sat4j.pb.reader.OPBReader2007
checkId, decode, decode, isGoodFirstCharacter, literalInAProduct, negateLiteralInAProduct, readTerm, translateVarToId
 
Methods inherited from class org.sat4j.pb.reader.OPBReader2005
beginObjective, constraintRelOp, constraintRightTerm, endObjective, eof, eol, get, getCoeffs, getListOfVariables, getObjectiveFunction, getVars, isGoodFollowingCharacter, metaData, parse, parseInstance, putback, readConstraint, readIdentifier, readInteger, readVariablesExplanation, readWord, skipSpaces
 
Methods inherited from class org.sat4j.reader.Reader
isVerbose, parseInstance, setVerbosity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAT4J_MAX_BIG_INTEGER

public static final BigInteger SAT4J_MAX_BIG_INTEGER
Constructor Detail

OPBReader2010

public OPBReader2010(IPBSolver solver)
Method Detail

readMetaData

protected void readMetaData()
                     throws IOException,
                            ParseFormatException
read the first comment line to get the number of variables and the number of constraints in the file calls metaData with the data that was read

Overrides:
readMetaData in class OPBReader2007
Throws:
IOException
ParseFormatException

readObjective

protected void readObjective()
                      throws IOException,
                             ParseFormatException
Description copied from class: OPBReader2005
read the objective line (if any) calls beginObjective, objectiveTerm and endObjective

Overrides:
readObjective in class OPBReader2005
Throws:
IOException
ParseFormatException

beginConstraint

protected void beginConstraint()
Description copied from class: OPBReader2005
callback called before we read a constraint

Overrides:
beginConstraint in class OPBReader2005

endConstraint

protected void endConstraint()
                      throws ContradictionException
Overrides:
endConstraint in class OPBReader2005
Throws:
ContradictionException

parseInstance

public IProblem parseInstance(Reader input)
                       throws ParseFormatException,
                              ContradictionException
Description copied from class: Reader
Read a file from a reader. Do not use that method, it is no longer supported.

Overrides:
parseInstance in class OPBReader2005
Parameters:
input - a stream containing the benchmark.
Returns:
the problem to solve (an ISolver in fact).
Throws:
ParseFormatException - if an error occurs during parsing.
ContradictionException - if the problem is found trivially inconsistent.
See Also:
Reader.parseInstance(InputStream)


Copyright © 2011 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.