예제 #1
0
        public static double SpectralRadius_Jacobi(MMatrix A)
        {
            Vector Eigenvalues = new Vector();
            MMatrix Eigenvectors = new MMatrix();
            MMatrix temp = A.Clone();

            temp.Jacobi_Cyclic_Method(ref Eigenvalues, ref Eigenvectors);
            Eigenvalues.Sort(true);

            return Math.Abs(Eigenvalues[0]);
        }
예제 #2
0
        public static double SpectralRadius(MMatrix A)
        {
            Vector Eigenvalues = new Vector();

            if (!A.IsSquared())
                throw new MMatrixException("Matrix must be squared.");
            Eigenvalues = A.QRIterationBasic(GlobalMath.MAXITER).DiagVector();
            Eigenvalues.Sort(true);

            return Math.Abs(Eigenvalues[0]);
        }