public static void Run(string[] args) { var param = args.Length > 1 && args[1] != null?int.Parse(args[1]) : 1; var tr = new MyMatrixTestRunner(); switch (args[0]) { case "-p": tr.WriteMatrices(param); break; case "-t": tr.LoadMatrices(); PerformMatrixOperations(tr, param); break; case "-c": CreateSummary(); break; default: DisplayHelp(); break; } }
public static void PerformMatrixOperations(MyMatrixTestRunner tr, int testCount) { tr.MatrixMulVectorTest(testCount); tr.MatrixAddMatrixMulVectorTest(testCount); tr.MatrixMulMatrixTest(testCount); try { tr.MatrixGaussianReductionNoPivotTest(testCount); tr.MatrixGaussianReductionPartialPivotTest(testCount); tr.MatrixGaussianReductionFullPivotTest(testCount); } catch (ArgumentException e) { Console.WriteLine(e.Message); } }