/***************************************************************** * OVERVIEW OF ALGORITHMS *****************************************************************/ /// <summary> /// Give an overview of the algorithms which are loaded. This is /// one initial mapping and one transformation algorithm, if any /// is loaded. /// </summary> private static void GiveOverviewOfLoadedAlgorithm() { ConsoleLayout.Header("Loaded algorithms"); ConsoleLayout.SubHeader("Initial Mapping Algorithm"); if (AlgorithmParameters.InitialMapping == null) { Console.WriteLine("There is no initial mapping algorithm loaded..."); } else { Console.WriteLine(AlgorithmParameters.InitialMapping.Name() + '\n' + AlgorithmParameters.InitialMapping.Parameters()); } ConsoleLayout.SubHeader("Transformation Algorithm"); if (AlgorithmParameters.Transformation == null) { Console.WriteLine("There is no transformation algorithm loaded..."); } else { Console.WriteLine(AlgorithmParameters.Transformation.Name() + '\n' + AlgorithmParameters.Transformation.Parameters()); } ConsoleLayout.Footer(); }
/// <summary> /// Give an overview of all algorithms which could be loaded. /// </summary> private static void GiveOverviewOfAvailableAlgorithms() { ConsoleLayout.Header("Available algorithms"); ConsoleLayout.SubHeader("Initial Mapping Algorithms"); if (AlgorithmParameters.AvailableInitialMappings.Count() == 0) { Console.WriteLine("No initial mapping algorithms are available..."); } else { var orderedInitalMappings = AlgorithmParameters.AvailableInitialMappings.OrderBy(item => item.GetType().FullName); Console.WriteLine("\n" + 1 + ": " + orderedInitalMappings.ElementAt(0).Name()); Console.WriteLine(orderedInitalMappings.ElementAt(0).Parameters()); for (int i = 1; i < AlgorithmParameters.AvailableInitialMappings.Count(); i++) { Console.WriteLine("\n" + (i + 1) + ": " + orderedInitalMappings.ElementAt(i).Name()); Console.WriteLine(orderedInitalMappings.ElementAt(i).Parameters()); } } ConsoleLayout.SubHeader("Transformation Algorithms"); if (AlgorithmParameters.AvailableTransformationAlgorithms.Count() == 0) { Console.WriteLine("No transformation algorithms are available..."); } else { var orderedTransformation = AlgorithmParameters.AvailableTransformationAlgorithms.OrderBy(item => item.GetType().FullName); Console.WriteLine("\n" + 1 + ": " + orderedTransformation.ElementAt(0).Name()); Console.WriteLine(orderedTransformation.ElementAt(0).Parameters()); for (int i = 1; i < AlgorithmParameters.AvailableTransformationAlgorithms.Count(); i++) { Console.WriteLine("\n" + (i + 1) + ": " + orderedTransformation.ElementAt(i).Name()); Console.WriteLine(orderedTransformation.ElementAt(i).Parameters()); } } ConsoleLayout.Footer(); }