示例#1
0
 /// <summary>
 /// Instantiate a new Vetex Cover problem
 /// </summary>
 /// <param name="threeSAT"></param>
 public VertexCover(ThreeSAT threeSAT)
 {
     this.threeSAT = threeSAT;
     // Creates a form
     form = new Form();
     // Create a viewer object
     viewer = new GViewer();
     // Create the graph object
     graph = new Graph("graph");
 }
示例#2
0
文件: MainProgram.cs 项目: CC-ULL/VC
        /// <summary>
        /// Main method of the program
        /// </summary>
        /// <param name="args"> Console arguments </param>
        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                Console.WriteLine("Usage: VC.exe file.sat3");
                return;
            }

            ThreeSAT   threeSAT = new ThreeSAT();
            FileLoader loader   = new FileLoader(threeSAT, args[0]);

            loader.LoadFile();
            VertexCover vc = new VertexCover(threeSAT);

            vc.BuildVertexCover();

            vc.Show();
        }
示例#3
0
 /// <summary>
 /// Instantiate a new reader for 3-SAT files
 /// </summary>
 /// <param name="threeSAT"> The 3-SAT instance to create </param>
 /// <param name="pathToFileName"> The path to the file location </param>
 public FileLoader(ThreeSAT threeSAT, string pathToFileName)
 {
     this.threeSAT  = threeSAT;
     PathToFileName = pathToFileName;
 }