static void MatrixWorkTask() { Console.WriteLine(new string('-', 15)); var mat = new Matrix(2, 2); mat.FillRandomly(); var mat2 = new Matrix(2, 2); mat2.FillRandomly(); var mulMatOnMat = Matrix.MatrixMultiplication(mat, mat2); Console.WriteLine(new string('-', 15)); Console.WriteLine(mat); Console.WriteLine(new string('-', 15)); Console.WriteLine(mat2); Console.WriteLine(new string('-', 15)); Console.WriteLine(mulMatOnMat); Console.WriteLine(new string('-', 15)); var vector = Helper.GetVectorFromConsole(); var matrixOnVector = Matrix.MulVector(mat, vector); InOutArray.PrintArray(vector); Console.WriteLine(new string('-', 15)); Console.WriteLine(matrixOnVector); Console.WriteLine(new string('-', 15)); }
private static void ArrayWorkTask() { var vat = new double[5] { 1, 7, 2, 10, 13 }; Helper.Sort(vat, true); InOutArray.PrintArray(vat); Console.WriteLine(new string('-', 15)); Helper.Sort(vat, false); InOutArray.PrintArray(vat); }