Exemplo n.º 1
0
        public static void RunOwnTestCase()
        {
            SparseMatrix M = SparseMatrix.RandomSparseSymmetricalMatrix(10, 9);

            //Console.WriteLine(string.Format("{0}\n",M.GetString()));
            M.CheckSymmetricalMatrixRules();
            Console.WriteLine("Symmetrical matrix : {0} {1}", M.InvalidMatrix.valid, M.InvalidMatrix.message);

            var(eigenValue, eigenVector) = M.ComputeEigenPair(1000);

            Console.WriteLine(string.Format("Eigen Value : {0}", eigenValue));
            Console.WriteLine(eigenVector.GetString());
        }
Exemplo n.º 2
0
        private void LoadOwnTestCaseButton_Click(object sender, EventArgs e)
        {
            OwnTestCase.ResetText();

            SparseMatrix M = SparseMatrix.RandomSparseSymmetricalMatrix(10, 9);

            M.CheckSymmetricalMatrixRules();
            OwnTestCase.AppendText(string.Format("Symmetrical matrix : {0} {1}\n\n", M.InvalidMatrix.valid, M.InvalidMatrix.message));

            var(eigenValue, eigenVector) = M.ComputeEigenPair(1000);

            OwnTestCase.AppendText(string.Format("Eigen Value : {0} \n\n", eigenValue));
            OwnTestCase.AppendText(eigenVector.GetString());
            OwnTestCase.AppendText("\n");
        }