From 2a5db460a9d9091238f64c48a640aac7cbe40678 Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Thu, 22 Apr 2021 20:43:24 -0500 Subject: implemented graph printing --- src/CS340.Plotter/Program.cs | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'src/CS340.Plotter/Program.cs') diff --git a/src/CS340.Plotter/Program.cs b/src/CS340.Plotter/Program.cs index 9e9a52a..cfffac2 100644 --- a/src/CS340.Plotter/Program.cs +++ b/src/CS340.Plotter/Program.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; +using System.Text; +using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Forms; using Graph; @@ -22,33 +24,7 @@ namespace Plotter Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Run(); Application.Run(new Plot()); } - - static void Run() - { - foreach (string file in Directory.GetFiles("graphs/")) - { - Tour bruteForce = Solve.BruteForce(file, 0); - Debug.WriteLine(bruteForce); - - // Graph mst = graph.MST(0); - // GraphFile.Print(mst, new ConsoleWriter()); - // Console.WriteLine( - // graph.Vertices.Sum(vertex => - // vertex.Edges.FirstOrDefault(edge => edge.V == vertex.Parent).Weight)); - - // mst.Vertices.ForEach(vertex => - // { - // Console.Write($"{vertex.Id}"); - // vertex.Edges.ForEach(edge => Console.Write($" {edge.V} {edge.Weight.ToString("F1")}")); - // Console.WriteLine(); - // }); - // Console.WriteLine(mst.Vertices - // .Sum(vertex => vertex.Edges - // .FirstOrDefault(edge => edge.V == vertex.Parent).Weight)); - } - } } } -- cgit v1.2.3-70-g09d2