Class DimacsFileGenerator

java.lang.Object
  extended byDimacsFileGenerator
All Implemented Interfaces:
Generator

public class DimacsFileGenerator
extends java.lang.Object
implements Generator

A Generator that simply reads a file representing a CNF in the style used in the DIMACS implementation challenge. (Note that these files must be uncompressed before using here.) Each time getNext is called, this same CNF is returned. This class also includes a main method for testing.


Constructor Summary
DimacsFileGenerator(java.lang.String file_name)
          Constructor for this generator.
 
Method Summary
 Literal[][] getNext()
          Returns the CNF read in from the named DIMACS file.
static void main(java.lang.String[] argv)
          This is a simple main which runs MySatSolver on the CNF stored in the file named in the first argument within the time limit specified by the second argument.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DimacsFileGenerator

public DimacsFileGenerator(java.lang.String file_name)
                    throws java.io.FileNotFoundException,
                           java.io.IOException
Constructor for this generator.

Parameters:
file_name - name of file containing DIMACS CNF description
Method Detail

getNext

public Literal[][] getNext()
Returns the CNF read in from the named DIMACS file.

Specified by:
getNext in interface Generator

main

public static void main(java.lang.String[] argv)
                 throws java.io.FileNotFoundException,
                        java.io.IOException
This is a simple main which runs MySatSolver on the CNF stored in the file named in the first argument within the time limit specified by the second argument.

Throws:
java.io.FileNotFoundException
java.io.IOException