/// <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"); }
/// <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(); }
/// <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; }