示例#1
0
        static void TestMatrixDeterminantCorrectness()
        {
            double[,] A = { { 1, 4, 7 }, { 2, 5, 8 }, { 3, 6, 9 } };  //Det = 0
            double[,] B = { { 1, 4, 3 }, { 2, 5, 8 }, { 3, 6, 9 } };  //Det = 12

            EigenWrapper.Matrix AMat = new EigenWrapper.Matrix(3, 3);
            EigenWrapper.Matrix BMat = new EigenWrapper.Matrix(3, 3);

            //Set the values for the matrix validation tests
            AMat[0, 0] = 1;
            AMat[0, 1] = 2;
            AMat[0, 2] = 3;
            AMat[1, 0] = 4;
            AMat[1, 1] = 5;
            AMat[1, 2] = 6;
            AMat[2, 0] = 7;
            AMat[2, 1] = 8;
            AMat[2, 2] = 9;

            BMat[0, 0] = 1;
            BMat[0, 1] = 2;
            BMat[0, 2] = 3;
            BMat[1, 0] = 4;
            BMat[1, 1] = 5;
            BMat[1, 2] = 6;
            BMat[2, 0] = 3;
            BMat[2, 1] = 8;
            BMat[2, 2] = 9;

            //Test the C# determinant accuracy
            Console.WriteLine("C# determinant correctness test:");
            Console.WriteLine("The first input matrix is:");
            PrintMatrix(A);
            double[,] Atrans = MatrixMathCS.Transpose(A);
            Console.WriteLine("The determinant is {0}", MatrixMathCS.Determinant(Atrans));
            Console.WriteLine("The second input matrix is:");
            PrintMatrix(B);
            double[,] Btrans = MatrixMathCS.Transpose(B);
            Console.WriteLine("The determinant is {0}", MatrixMathCS.Determinant(Btrans));
            Console.WriteLine();

            //Test the Eigen determinant accuracy
            Console.WriteLine("P/Invoke Eigen 2D double array determinant correctness test:");
            Console.WriteLine("The first input matrix is:");
            PrintMatrix(A);
            Console.WriteLine("The determinant is {0}", EigenWrapper.MatrixMath.MatrixDeterminant(A));
            Console.WriteLine("The second input matrix is:");
            PrintMatrix(B);
            Console.WriteLine("The determinant is {0}", EigenWrapper.MatrixMath.MatrixDeterminant(B));
            Console.WriteLine();

            //Test the Matrix class determinant accuracy
            Console.WriteLine("P/Invoke Eigen matrix class has inverse correctness test:");
            Console.WriteLine("The first input matrix is:");
            PrintMatrix(AMat);
            Console.WriteLine("The determinant is {0}", AMat.Determinant());
            Console.WriteLine("The second input matrix is:");
            PrintMatrix(BMat);
            Console.WriteLine("The determinant is {0}", EigenWrapper.Matrix.Determinant(BMat));
        }
示例#2
0
        //Matrix inversion speed test functions
        static void TestCSInvertSpeed(double[,] A)
        {
            double[,] C = new double[matrixSize, matrixSize];
            Stopwatch watch = Stopwatch.StartNew();

            for (int i = 0; i < testIterations; i++)
            {
                C = MatrixMathCS.InverseMatrix(A);
            }
            watch.Stop();
            Console.WriteLine("C# inverse test took: " + watch.ElapsedMilliseconds + " ms.");
        }
示例#3
0
        static void TestCSMultiplySpeed(double[,] A, double[,] B)
        {
            double[,] C = new double[matrixSize, matrixSize];
            Stopwatch watch = Stopwatch.StartNew();

            for (int i = 0; i < testIterations; i++)
            {
                C = MatrixMathCS.MultiplyMatrices(A, B);
            }
            watch.Stop();
            Console.WriteLine("C# multiply test took: " + watch.ElapsedMilliseconds + " ms.");
        }
示例#4
0
        static void TestMatrixScalarMultiplyCorrectness()
        {
            double[,] ATest = { { 1, 4 }, { 2, 5 }, { 3, 6 } };
            double b = 3;

            EigenWrapper.Matrix AMatTest = new EigenWrapper.Matrix(2, 3);

            //Set the values for the matrix validation tests
            AMatTest[0, 0] = 1;
            AMatTest[0, 1] = 2;
            AMatTest[0, 2] = 3;
            AMatTest[1, 0] = 4;
            AMatTest[1, 1] = 5;
            AMatTest[1, 2] = 6;

            //Testing the C# multiplcation accuracy
            Console.WriteLine("C# matrix * scalar correctness test:");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(ATest);
            Console.WriteLine("The input scalar is:");
            Console.WriteLine(b);
            Console.WriteLine("The result is:");
            double[,] Atrans = MatrixMathCS.Transpose(ATest);
            double[,] C      = MatrixMathCS.ScalarTimesMatrix(b, Atrans);
            double[,] Ctrans = MatrixMathCS.Transpose(C);
            PrintMatrix(Ctrans);
            Console.WriteLine();

            //Test the Eigen multiplication accuracy
            Console.WriteLine("P/Invoke Eigen 2D double array matrix * scalar correctness test:");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(ATest);
            Console.WriteLine("The input scalar is:");
            Console.WriteLine(b);
            Console.WriteLine("The result is:");
            double[,] D = EigenWrapper.MatrixMath.MultiplyMatrixScalar(ATest, b);
            PrintMatrix(D);
            Console.WriteLine();

            //Test the Matrix class multiplication accuracy
            Console.WriteLine("P/Invoke Eigen matrix class matrix * scalar correctness test:");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(AMatTest);
            Console.WriteLine("The input scalar is:");
            Console.WriteLine(b);
            Console.WriteLine("The b*A result is:");
            EigenWrapper.Matrix CMat = b * AMatTest;
            PrintMatrix(CMat);
            Console.WriteLine("The A*b result is:");
            EigenWrapper.Matrix DMat = AMatTest * b;
            PrintMatrix(DMat);
        }
示例#5
0
        static void TestMatrixScalarDivideCorrectness()
        {
            double[,] ATest = { { 1, 4 }, { 2, 5 }, { 3, 6 } };
            double b = 2;

            EigenWrapper.Matrix AMatTest = new EigenWrapper.Matrix(2, 3);

            //Set the values for the matrix validation tests
            AMatTest[0, 0] = 1;
            AMatTest[0, 1] = 2;
            AMatTest[0, 2] = 3;
            AMatTest[1, 0] = 4;
            AMatTest[1, 1] = 5;
            AMatTest[1, 2] = 6;

            //Testing the C# divide accuracy
            Console.WriteLine("C# matrix / scalar correctness test:");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(ATest);
            Console.WriteLine("The input scalar is:");
            Console.WriteLine(b);
            Console.WriteLine("The result is:");
            double[,] Atrans = MatrixMathCS.Transpose(ATest);
            double[,] C      = MatrixMathCS.DivideMatrixbyScalar(Atrans, b);
            double[,] Ctrans = MatrixMathCS.Transpose(C);
            PrintMatrix(Ctrans);
            Console.WriteLine();

            //Test the Eigen divide accuracy
            Console.WriteLine("P/Invoke Eigen 2D double array matrix / scalar correctness test:");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(ATest);
            Console.WriteLine("The input scalar is:");
            Console.WriteLine(b);
            Console.WriteLine("The result is:");
            double[,] D = EigenWrapper.MatrixMath.DivideMatrixScalar(ATest, b);
            PrintMatrix(D);
            Console.WriteLine();

            //Test the Matrix class divide accuracy
            Console.WriteLine("P/Invoke Eigen matrix class matrix / scalar correctness test:");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(AMatTest);
            Console.WriteLine("The input scalar is:");
            Console.WriteLine(b);
            Console.WriteLine("The result is:");
            EigenWrapper.Matrix CMat = AMatTest / b;
            PrintMatrix(CMat);
        }
示例#6
0
        static void TestInverseCorrectness()
        {
            double[,] A = { { 1, -2, -3, -4 }, { 2, -5, -6, -7 }, { 3, 7, -8, -9 }, { 4, 8, 12, 16 } };
            EigenWrapper.Matrix AMat = new EigenWrapper.Matrix(4, 4);
            AMat[0, 0] = 1;
            AMat[0, 1] = 2;
            AMat[0, 2] = 3;
            AMat[0, 3] = 4;
            AMat[1, 0] = -2;
            AMat[1, 1] = -5;
            AMat[1, 2] = 7;
            AMat[1, 3] = 8;
            AMat[2, 0] = -3;
            AMat[2, 1] = -6;
            AMat[2, 2] = -8;
            AMat[2, 3] = 12;
            AMat[3, 0] = -4;
            AMat[3, 1] = -7;
            AMat[3, 2] = -9;
            AMat[3, 3] = 16;

            //Test the C# inverse correctness
            Console.WriteLine("C# matrix inverse...");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(A);
            Console.WriteLine("The inverse matrix is:");
            double[,] Atrans = MatrixMathCS.Transpose(A);
            double[,] C      = MatrixMathCS.InverseMatrix(Atrans);
            double[,] Ctrans = MatrixMathCS.Transpose(C);
            PrintMatrix(Ctrans);
            Console.WriteLine();

            //Test the Eigen matrix inverse correctness
            Console.WriteLine("P/Invoke Eigen 2D double array matrix inverse...");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(A);
            Console.WriteLine("The inverse matrix is:");
            double[,] D = EigenWrapper.MatrixMath.InvertMatrix(A);
            PrintMatrix(D);
            Console.WriteLine();

            //Test the matrix class inverse correctness
            Console.WriteLine("P/Invoke Eigen matrix class inverse...");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(AMat);
            Console.WriteLine("The inverse matrix is:");
            EigenWrapper.Matrix CMat = AMat.Inverse();
            PrintMatrix(CMat);
        }
示例#7
0
        static void TestVectorCrossProduct()
        {
            double[] a = { 1, 0, 0 };
            double[] b = { 0, 1, 0 };

            EigenWrapper.Vector aVec = new EigenWrapper.Vector(3);
            EigenWrapper.Vector bVec = new EigenWrapper.Vector(3);
            aVec[0] = 1;
            aVec[1] = 0;
            aVec[2] = 0;
            bVec[0] = 0;
            bVec[1] = 1;
            bVec[2] = 0;

            //Test the Vector class cross product
            Console.WriteLine("C# vector cross product correctness test:");
            Console.WriteLine("The first input vector is:");
            PrintVector(a);
            Console.WriteLine("The second input vector is:");
            PrintVector(b);
            Console.WriteLine("The cross product of a x b is:");
            PrintVector(MatrixMathCS.CrossProduct(a, b));
            Console.WriteLine();

            //Test the Eigen cross product
            Console.WriteLine("P/Invoke Eigen double array cross product correctness test:");
            Console.WriteLine("The first input vector is:");
            PrintVector(a);
            Console.WriteLine("The second input vector is:");
            PrintVector(b);
            Console.WriteLine("The cross product of a x b is:");
            PrintVector(EigenWrapper.VectorMath.CrossProduct(a, b));
            Console.WriteLine();

            //Test the Vector class cross product
            Console.WriteLine("P/Invoke Eigen matrix class cross product correctness test:");
            Console.WriteLine("The first input vector is:");
            PrintVector(aVec);
            Console.WriteLine("The second input vector is:");
            PrintVector(bVec);
            Console.WriteLine("The cross product of a x b is:");
            PrintVector(aVec.CrossProduct(bVec));
        }
示例#8
0
        static void TestMatrixNormCorrectness()
        {
            double[,] A = { { 51, 634, 70 }, { 2, 57, 8 }, { 53, 63, 91 } };  //Det = 0

            EigenWrapper.Matrix AMat = new EigenWrapper.Matrix(3, 3);

            //Set the values for the matrix validation tests
            AMat[0, 0] = 51;
            AMat[0, 1] = 2;
            AMat[0, 2] = 53;
            AMat[1, 0] = 634;
            AMat[1, 1] = 57;
            AMat[1, 2] = 63;
            AMat[2, 0] = 70;
            AMat[2, 1] = 8;
            AMat[2, 2] = 91;

            //Test the C# matrix norm
            Console.WriteLine("C# matrix norm correctness test:");
            Console.WriteLine("The test matrix A is:");
            PrintMatrix(A);
            Console.WriteLine("The matrix norm of A is:");
            double[,] Atrans = MatrixMathCS.Transpose(A);
            Console.WriteLine(MatrixMathCS.MatrixNorm(Atrans).ToString());
            Console.WriteLine();

            //Test the Eigen matrix norm
            Console.WriteLine("P/Invoke Eigen 2D double array matrix norm correctness test:");
            Console.WriteLine("The test matrix A is:");
            PrintMatrix(A);
            Console.WriteLine("The matrix norm of A is:");
            Console.WriteLine(EigenWrapper.MatrixMath.MatrixNorm(A));
            Console.WriteLine();

            //Test the Matrix class norm
            Console.WriteLine("P/Invoke Eigen matrix class matrix norm correctness test:");
            Console.WriteLine("The test matrix A is:");
            PrintMatrix(AMat);
            Console.WriteLine("The matrix norm of A is:");
            Console.WriteLine(AMat.Norm().ToString());
        }
示例#9
0
        static void TestTransposeCorrectness()
        {
            double[,] ATest = { { 1, 4 }, { 2, 5 }, { 3, 6 } };
            EigenWrapper.Matrix AMatTest = new EigenWrapper.Matrix(2, 3);

            //Set the values for the matrix validation tests
            AMatTest[0, 0] = 1;
            AMatTest[0, 1] = 2;
            AMatTest[0, 2] = 3;
            AMatTest[1, 0] = 4;
            AMatTest[1, 1] = 5;
            AMatTest[1, 2] = 6;

            //Testing the C# transpose accuracy
            Console.WriteLine("C# transpose correctness test:");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(ATest);
            Console.WriteLine("The result is:");
            double[,] Atrans = MatrixMathCS.Transpose(ATest);
            double[,] C      = MatrixMathCS.Transpose(ATest);
            double[,] Ctrans = MatrixMathCS.Transpose(C);
            PrintMatrix(C);
            Console.WriteLine();

            //Test the Eigen transpose accuracy
            Console.WriteLine("P/Invoke Eigen 2D double array transpose correctness test:");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(ATest);
            Console.WriteLine("The result is:");
            double[,] D = EigenWrapper.MatrixMath.TransposeMatrix(ATest);
            PrintMatrix(D);
            Console.WriteLine();

            //Test the Matrix class transpose accuracy
            Console.WriteLine("P/Invoke Eigen matrix class transpose correctness test:");
            Console.WriteLine("The input matrix is:");
            PrintMatrix(AMatTest);
            Console.WriteLine("The result is:");
            EigenWrapper.Matrix CMat = AMatTest.Transpose();
            PrintMatrix(CMat);
        }
示例#10
0
        static void TestSubtractionCorrectness()
        {
            double[,] ATest = { { 1, 4, 7 }, { 2, 5, 8 }, { 3, 6, 9 } };
            double[,] BTest = { { 10, 40, 70 }, { 20, 50, 80 }, { 30, 60, 90 } };
            EigenWrapper.Matrix AMatTest = new EigenWrapper.Matrix(3, 3);
            EigenWrapper.Matrix BMatTest = new EigenWrapper.Matrix(3, 3);

            //Set the values for the matrix validation tests
            AMatTest[0, 0] = 1;
            AMatTest[0, 1] = 2;
            AMatTest[0, 2] = 3;
            AMatTest[1, 0] = 4;
            AMatTest[1, 1] = 5;
            AMatTest[1, 2] = 6;
            AMatTest[2, 0] = 7;
            AMatTest[2, 1] = 8;
            AMatTest[2, 2] = 9;

            BMatTest[0, 0] = 10;
            BMatTest[0, 1] = 20;
            BMatTest[0, 2] = 30;
            BMatTest[1, 0] = 40;
            BMatTest[1, 1] = 50;
            BMatTest[1, 2] = 60;
            BMatTest[2, 0] = 70;
            BMatTest[2, 1] = 80;
            BMatTest[2, 2] = 90;

            //Testing the C# subtraction accuracy
            Console.WriteLine("C# subtraction correctness test:");
            Console.WriteLine("The input matrices are:");
            PrintMatrix(ATest);
            Console.WriteLine("and:");
            PrintMatrix(BTest);
            Console.WriteLine("The result is:");
            double[,] Atrans = MatrixMathCS.Transpose(ATest);
            double[,] Btrans = MatrixMathCS.Transpose(BTest);
            double[,] C      = MatrixMathCS.SubtractMatrices(Atrans, Btrans);
            double[,] Ctrans = MatrixMathCS.Transpose(C);
            PrintMatrix(Ctrans);
            Console.WriteLine();

            //Test the Eigen subtraction accuracy
            Console.WriteLine("P/Invoke Eigen 2D double array subtraction correctness test:");
            Console.WriteLine("The input matrices are:");
            PrintMatrix(ATest);
            Console.WriteLine("and:");
            PrintMatrix(BTest);
            Console.WriteLine("The result is:");
            double[,] D = EigenWrapper.MatrixMath.SubtractMatrices(ATest, BTest);
            PrintMatrix(D);
            Console.WriteLine();

            //Test the Matrix class subtraction accuracy
            Console.WriteLine("P/Invoke Eigen matrix class subtraction correctness test:");
            Console.WriteLine("The input matrices are:");
            PrintMatrix(AMatTest);
            Console.WriteLine("and:");
            PrintMatrix(BMatTest);
            Console.WriteLine("The result is:");
            EigenWrapper.Matrix CMat = AMatTest - BMatTest;
            PrintMatrix(CMat);
        }
示例#11
0
        static void TestAdditionCorrectness()
        {
            double[,] ATest = { { 1, 4, 7 }, { 2, 5, 8 }, { 3, 6, 9 } };
            double[,] BTest = { { 1, 4, 7 }, { 2, 5, 8 }, { 3, 6, 9 } };
            EigenWrapper.Matrix AMatTest = new EigenWrapper.Matrix(3, 3);
            EigenWrapper.Matrix BMatTest = new EigenWrapper.Matrix(3, 3);

            //Set the values for the matrix validation tests
            AMatTest[0, 0] = 1;
            AMatTest[0, 1] = 2;
            AMatTest[0, 2] = 3;
            AMatTest[1, 0] = 4;
            AMatTest[1, 1] = 5;
            AMatTest[1, 2] = 6;
            AMatTest[2, 0] = 7;
            AMatTest[2, 1] = 8;
            AMatTest[2, 2] = 9;

            BMatTest[0, 0] = 1;
            BMatTest[0, 1] = 2;
            BMatTest[0, 2] = 3;
            BMatTest[1, 0] = 4;
            BMatTest[1, 1] = 5;
            BMatTest[1, 2] = 6;
            BMatTest[2, 0] = 7;
            BMatTest[2, 1] = 8;
            BMatTest[2, 2] = 9;

            //Testing the C# addition accuracy
            Console.WriteLine("C# addition correctness test:");
            Console.WriteLine("The input matrices are:");
            PrintMatrix(ATest);
            Console.WriteLine("and:");
            PrintMatrix(BTest);
            Console.WriteLine("The result is:");
            double[,] Atrans = MatrixMathCS.Transpose(ATest);
            double[,] Btrans = MatrixMathCS.Transpose(BTest);
            double[,] C      = MatrixMathCS.AddMatrices(Atrans, Btrans);
            double[,] Ctrans = MatrixMathCS.Transpose(C);
            PrintMatrix(Ctrans);
            Console.WriteLine();

            //Test the Eigen addition accuracy
            Console.WriteLine("P/Invoke Eigen 2D double array addition correctness test:");
            Console.WriteLine("The input matrices are:");
            PrintMatrix(ATest);
            Console.WriteLine("and:");
            PrintMatrix(BTest);
            Console.WriteLine("The result is:");
            double[,] D = EigenWrapper.MatrixMath.AddMatrices(ATest, BTest);
            PrintMatrix(D);
            Console.WriteLine();

            //Test the Matrix class addition accuracy
            Console.WriteLine("P/Invoke Eigen matrix class addition correctness test:");
            Console.WriteLine("The input matrices are:");
            PrintMatrix(AMatTest);
            Console.WriteLine("and:");
            PrintMatrix(BMatTest);
            Console.WriteLine("The result is:");
            EigenWrapper.Matrix CMat = AMatTest + BMatTest;
            PrintMatrix(CMat);
        }
示例#12
0
        //Correctness test functions (these are not rigorous tests, just a spot check!)
        static void TestMultiplyCorrectness()
        {
            double[,] ATest = { { 1, 3, 5, 7 }, { 2, 4, 6, 8 } };
            double[,] BTest = { { 1, 4 }, { 2, 5 }, { 3, 6 } };
            EigenWrapper.Matrix AMatTest = new EigenWrapper.Matrix(4, 2);
            EigenWrapper.Matrix BMatTest = new EigenWrapper.Matrix(2, 3);

            //Set the values for the matrix validation tests
            AMatTest[0, 0] = 1;
            AMatTest[0, 1] = 2;
            AMatTest[1, 0] = 3;
            AMatTest[1, 1] = 4;
            AMatTest[2, 0] = 5;
            AMatTest[2, 1] = 6;
            AMatTest[3, 0] = 7;
            AMatTest[3, 1] = 8;
            BMatTest[0, 0] = 1;
            BMatTest[0, 1] = 2;
            BMatTest[0, 2] = 3;
            BMatTest[1, 0] = 4;
            BMatTest[1, 1] = 5;
            BMatTest[1, 2] = 6;

            double[,] C = new double[BTest.GetLength(0), ATest.GetLength(1)];
            double[,] D = new double[BTest.GetLength(0), ATest.GetLength(1)];
            EigenWrapper.Matrix CMat;

            //Testing the C# multiplcation accuracy
            Console.WriteLine("C# multiplication accuracy test:");
            Console.WriteLine("The input matrices are:");
            PrintMatrix(ATest);
            Console.WriteLine("and:");
            PrintMatrix(BTest);
            Console.WriteLine("The result is:");
            double[,] Atrans = MatrixMathCS.Transpose(ATest);
            double[,] Btrans = MatrixMathCS.Transpose(BTest);
            C = MatrixMathCS.MultiplyMatrices(Atrans, Btrans);
            double[,] Ctrans = MatrixMathCS.Transpose(C);
            PrintMatrix(Ctrans);
            Console.WriteLine();

            //Test the Eigen multiplication accuracy
            Console.WriteLine("P/Invoke Eigen 2D double array multiplication correctness test:");
            Console.WriteLine("The input matrices are:");
            PrintMatrix(ATest);
            Console.WriteLine("and:");
            PrintMatrix(BTest);
            Console.WriteLine("The result is:");
            D = EigenWrapper.MatrixMath.MultiplyMatrices(ATest, BTest);
            PrintMatrix(D);
            Console.WriteLine();

            //Test the Matrix class multiplication accuracy
            Console.WriteLine("P/Invoke Eigen matrix class multiplication correctness test:");
            Console.WriteLine("The input matrices are:");
            PrintMatrix(AMatTest);
            Console.WriteLine("and:");
            PrintMatrix(BMatTest);
            Console.WriteLine("The result is:");
            CMat = AMatTest * BMatTest;
            PrintMatrix(CMat);
        }
示例#13
0
        static void Main(string[] args)
        {
            //Create the test matrices
            double[,] A = MatrixMathCS.RandomMatrix(matrixSize, matrixSize, 100, -100);
            double[,] B = MatrixMathCS.RandomMatrix(matrixSize, matrixSize, 100, -100);
            EigenWrapper.Matrix          AMatrix = EigenWrapper.Matrix.RandomMatrix(matrixSize, matrixSize, -100, 100);
            EigenWrapper.Matrix          BMatrix = EigenWrapper.Matrix.RandomMatrix(matrixSize, matrixSize, -100, 100);
            EigenWrapper_CppCLI.MatrixXd matrixA = new EigenWrapper_CppCLI.MatrixXd(matrixSize, matrixSize);
            EigenWrapper_CppCLI.MatrixXd matrixB = new EigenWrapper_CppCLI.MatrixXd(matrixSize, matrixSize);

            //Run the multiplication speed tests, if requested
            if (runMultSpeed)
            {
                TestCSMultiplySpeed(A, B);
                TestCppCLIMultiplySpeed(matrixA, matrixB);
                TestEigenMultiplySpeed(A, B);
                TestMatrixMultiplySpeed(AMatrix, BMatrix);
            }
            else
            {
                Console.WriteLine("Skipping multiplication speed tests...");
            }
            ConditionalPause();
            Console.WriteLine();

            //Run the matrix inversion speed tests, if requested
            if (runInvSpeed)
            {
                TestCSInvertSpeed(A);
                //CppCLI inverse hasn't been implemented
                TestEigenInvertSpeed(A);
                TestMatrixInvertSpeed(AMatrix);
            }
            else
            {
                Console.WriteLine("Skipping matrix inversion speed tests...");
            }
            ConditionalPause();
            Console.WriteLine();

            //Run the method correctness tests, if requested
            if (runCorrectness)
            {
                //Test the correctness of the matrix multiplication
                TestMultiplyCorrectness();
                ConditionalPause();
                Console.WriteLine();

                //Test the correctness of the matrix inverse calculations
                TestInverseCorrectness();
                ConditionalPause();
                Console.WriteLine();

                //Test the correctness of the matrix addition calculations
                TestAdditionCorrectness();
                ConditionalPause();
                Console.WriteLine();

                //Test the correctness of the matrix subtraction calculations
                TestSubtractionCorrectness();
                ConditionalPause();
                Console.WriteLine();

                //Test the correctness of the transpose
                TestTransposeCorrectness();
                ConditionalPause();
                Console.WriteLine();

                //Test the correctness of the matrix * scalar calculation
                TestMatrixScalarMultiplyCorrectness();
                ConditionalPause();
                Console.WriteLine();

                //Test the correctness of the matrix / scalar calculation
                TestMatrixScalarDivideCorrectness();
                ConditionalPause();
                Console.WriteLine();

                //Test the correctness of the matrix * vector calculation
                TestMatrixVectorMultiplyCorrectness();
                ConditionalPause();
                Console.WriteLine();

                //Test the correctness of the determinant calculation
                TestMatrixDeterminantCorrectness();
                ConditionalPause();
                Console.WriteLine();

                //Test the correctness of the has inverse calculation
                TestIsInvertableCorrectness();
                ConditionalPause();
                Console.WriteLine();

                //Test the correctness of the matrix norm calculation
                TestMatrixNormCorrectness();
                ConditionalPause();
                Console.WriteLine();

                //Test the correctness of the vector cross product calculation
                TestVectorCrossProduct();
                ConditionalPause();
                Console.WriteLine();
            }
            else
            {
                Console.WriteLine("Skipping correctness tests...");
            }

            Console.WriteLine();
            Console.WriteLine("Press enter to exit...");
            Console.ReadLine();
        }