Example #1
0
        /// <summary>
        /// Handles the input for graph data; calls GraphInputter class to assist
        /// </summary>
        /// <param name="graphInputter">GraphInputter class that adds graph data input functionality</param>
        /// <returns>Completed adjacency matrix from user input</returns>
        public static int[,] graphInput(GraphInputter graphInputter)
        {
            Console.WriteLine("These next steps will guide you in inputting your graph for analysis");
            int[,] adjacencyMatrix = graphInputter.graphInput();

            return(adjacencyMatrix);
        }
Example #2
0
        /// <summary>
        /// Entry point for all functionality
        /// </summary>
        public static void Main()
        {
            // Salutations
            Console.WriteLine("Quinton's Hamiltonian Circuit Finder v2.0\n\n");

            // Create new GraphInputter Object
            GraphInputter graphInputter = new GraphInputter();

            // Obtain graph data
            int[,] adjacencyMatrix = graphInput(graphInputter);

            // calculate nearest neighbor circuit
            List <int[]> nNResult = graphInputter.nearestNeighbor(adjacencyMatrix);

            // Print results of Nearest Neighbor
            Console.WriteLine("Result of Nearest Neighbor Search: ");
            pathPrinter(nNResult);
        }