예제 #1
0
        private static void Update_u_split(int topr, int bottomr, GMatrix u, double
			[] cosl, double[] sinl, GMatrix t, GMatrix m)
        {
            int j;
            double utemp;
            for (j = 0; j < u.nCol; j++)
            {
                utemp = u.values[topr][j];
                u.values[topr][j] = cosl[0] * utemp - sinl[0] * u.values[bottomr][j];
                u.values[bottomr][j] = sinl[0] * utemp + cosl[0] * u.values[bottomr][j];
            }
            System.Console.Out.WriteLine("\nm=");
            CheckMatrix(m);
            System.Console.Out.WriteLine("\nu=");
            CheckMatrix(t);
            m.Mul(t, m);
            System.Console.Out.WriteLine("\nt*m=");
            CheckMatrix(m);
        }
예제 #2
0
        private static void Update_v_split(int topr, int bottomr, GMatrix v, double
			[] cosr, double[] sinr, GMatrix t, GMatrix m)
        {
            int j;
            double vtemp;
            for (j = 0; j < v.nRow; j++)
            {
                vtemp = v.values[j][topr];
                v.values[j][topr] = cosr[0] * vtemp - sinr[0] * v.values[j][bottomr];
                v.values[j][bottomr] = sinr[0] * vtemp + cosr[0] * v.values[j][bottomr];
            }
            System.Console.Out.WriteLine("topr    =" + topr);
            System.Console.Out.WriteLine("bottomr =" + bottomr);
            System.Console.Out.WriteLine("cosr =" + cosr[0]);
            System.Console.Out.WriteLine("sinr =" + sinr[0]);
            System.Console.Out.WriteLine("\nm =");
            CheckMatrix(m);
            System.Console.Out.WriteLine("\nv =");
            CheckMatrix(t);
            m.Mul(m, t);
            System.Console.Out.WriteLine("\nt*m =");
            CheckMatrix(m);
        }
예제 #3
0
        private static void Print_m(GMatrix m, GMatrix u, GMatrix
			 v)
        {
            GMatrix mtmp = new GMatrix(m.nCol, m.nRow);
            mtmp.Mul(u, mtmp);
            mtmp.Mul(mtmp, v);
            System.Console.Out.WriteLine("\n m = \n" + GMatrix.ToString(mtmp));
        }