Exemple #1
0
        private static Graph loadGraph(string inputFile)
        {
            IInputLoader l;
            var          ext = new System.IO.FileInfo(inputFile).Extension;

            if (ext.Equals(".txt"))
            {
                l = new TestInput();
            }
            else if (ext.Equals(".col"))
            {
                l = new GeneratedSampleInput();
            }
            else
            {
                l = new TestInput();
                Console.Error.WriteLine("Warning: could not determine input type for extension {0}", ext);
            }
            Graph g = l.load(inputFile);

            return(g);
        }