コード例 #1
0
        public static Vector Danilevsky_Values(Matrix val, double e = 0.001)
        {
            Danilevsky dan = new Danilevsky(val);
            Console.WriteLine("Q=" + dan.Q);
            double temp = 0;
            Vector eigenvalues = new Vector(val.ColumnCount);
            Vector I = new Vector(Intervals(val, dan.Q));
            for (int i = 0; i < val.ColumnCount; i++)
            {
                temp = method_bisection(dan.Q, I[i], I[i + 1], e);
                eigenvalues[i] = temp;
            }

            return eigenvalues;
        }
コード例 #2
0
 public Matrix Danilevsky_Vectors(Matrix val)
 {
     Matrix A = new Matrix(val);
     Danilevsky dan = new Danilevsky(A);
     Matrix Y = new Matrix(val.RowCount, val.ColumnCount);
     Matrix T = dan.S;
     Vector R = new Vector(val.RowCount);
     R = Danilevsky_Values(dan.A);
     for (int i = 0; i < val.ColumnCount; i++)
     {
         for (int j = 0; j < val.RowCount; j++)
         {
             Y[val.RowCount - 1 - j, i] = Math.Pow(R[i], j);
         }
     }
     A = T * Y;
     double a = 0;
     for (int i = 0; i < val.ColumnCount; i++)
     {
         a = MathM.vect_norm_2(A.Get_column(i));
         for (int j = 0; j < val.RowCount; j++)
         {
             A[j, i] /= a;
         }
     }
     return A;
 }