Beispiel #1
0
        static void Main(string[] args)
        {
            double[,] matrix = CreateMatrix();

            MyMatrix mymatrix = new MyMatrix(matrix);
            string   str      = CreateString();

            ShowMatrix(mymatrix);
            MyMatrix mymatrix2 = new MyMatrix(str);

            ShowMatrix(mymatrix2);
            Console.WriteLine(mymatrix.Height + " " + mymatrix.Width + " " + mymatrix2.Height + " " + mymatrix2.Width);
            MyMatrix mymatrix3 = mymatrix * mymatrix2;

            ShowMatrix(mymatrix3.GetMatrix());
            mymatrix3[1, 2] = 0;
            ShowMatrix(mymatrix3.GetMatrix());
            Console.WriteLine(mymatrix3);
            MyMatrix mymatrix4 = mymatrix3.GetTransponedCopy();

            Console.WriteLine(mymatrix4);
            mymatrix2.TransponeMe();
            Console.WriteLine(mymatrix2);

            // double[][] mat = CreateMatrixJagged();
            //  MyMatrix Mymatrix = new MyMatrix(mat);
            //ShowMatrix(mymatrix.GetMatrix());
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            double[,] matrix  = CreateMatrix();
            double[,] matrix2 = CreateMatrix();
            MyMatrix mymatrix = new MyMatrix(matrix);

            ShowOneMatrix(mymatrix.GetMatrix());
            MyMatrix mymatrix2 = new MyMatrix(matrix2);

            ShowMatrix(mymatrix2.GetMatrix());
            MyMatrix mat = mymatrix * mymatrix2;

            ShowOneMatrix(mat.GetMatrix());
        }
Beispiel #3
0
        public void TransponeMe()
        {
            MyMatrix mymatrix = new MyMatrix(GetTransponedArray());

            Matrix = mymatrix.GetMatrix();
        }