org.sat4j.pb
Class GoodOPBReader

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

public class GoodOPBReader
extends org.sat4j.reader.Reader
implements 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(org.sat4j.pb.IPBSolver solver)
           
 
Method Summary
 String decode(int[] model)
           
 void decode(int[] model, PrintWriter out)
           
 org.sat4j.specs.IProblem parseInstance(InputStream in)
           
 org.sat4j.specs.IProblem parseInstance(Reader in)
           
 
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
 

Constructor Detail

GoodOPBReader

public GoodOPBReader(org.sat4j.pb.IPBSolver solver)
Method Detail

parseInstance

public final org.sat4j.specs.IProblem parseInstance(Reader in)
                                             throws org.sat4j.reader.ParseFormatException,
                                                    org.sat4j.specs.ContradictionException,
                                                    IOException
Overrides:
parseInstance in class org.sat4j.reader.Reader
Throws:
org.sat4j.reader.ParseFormatException
org.sat4j.specs.ContradictionException
IOException

decode

public String decode(int[] model)
Specified by:
decode in class org.sat4j.reader.Reader

decode

public void decode(int[] model,
                   PrintWriter out)
Specified by:
decode in class org.sat4j.reader.Reader

parseInstance

public org.sat4j.specs.IProblem parseInstance(InputStream in)
                                       throws org.sat4j.reader.ParseFormatException,
                                              org.sat4j.specs.ContradictionException,
                                              IOException
Specified by:
parseInstance in class org.sat4j.reader.Reader
Throws:
org.sat4j.reader.ParseFormatException
org.sat4j.specs.ContradictionException
IOException


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